replace wrappers with hooks
Some checks failed
pr / test (pull_request) Failing after 2m59s
lint / lint (pull_request) Successful in 11m36s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-04-22 08:47:50 +03:00
parent c3de003e4a
commit add3ce478c
28 changed files with 1116 additions and 587 deletions

View File

@@ -62,6 +62,13 @@ type Server interface {
String() string
}
type (
FuncBatchSubHandler func(ctxs []context.Context, ms []Message) error
HookBatchSubHandler func(next FuncBatchSubHandler) FuncBatchSubHandler
FuncSubHandler func(ctx context.Context, ms Message) error
HookSubHandler func(next FuncSubHandler) FuncSubHandler
)
/*
// Router handle serving messages
type Router interface {
@@ -147,12 +154,11 @@ type Stream interface {
//
// Example:
//
// type Greeter struct {}
//
// func (g *Greeter) Hello(context, request, response) error {
// return nil
// }
// type Greeter struct {}
//
// func (g *Greeter) Hello(context, request, response) error {
// return nil
// }
type Handler interface {
Name() string
Handler() interface{}