Merge pull request 'update call Hooks' (#193) from devstigneev/micro-server-grpc:v3 into v3
All checks were successful
test / test (push) Successful in 2m27s
All checks were successful
test / test (push) Successful in 2m27s
Reviewed-on: #193
This commit is contained in:
commit
699358383d
4
grpc.go
4
grpc.go
@ -420,7 +420,7 @@ func (g *Server) processRequest(ctx context.Context, stream grpc.ServerStream, s
|
||||
return err
|
||||
}
|
||||
|
||||
g.opts.Hooks.EachNext(func(hook options.Hook) {
|
||||
g.opts.Hooks.EachPrev(func(hook options.Hook) {
|
||||
if h, ok := hook.(server.HookHandler); ok {
|
||||
fn = h(fn)
|
||||
}
|
||||
@ -504,7 +504,7 @@ func (g *Server) processStream(ctx context.Context, stream grpc.ServerStream, se
|
||||
return nil
|
||||
}
|
||||
|
||||
opts.Hooks.EachNext(func(hook options.Hook) {
|
||||
opts.Hooks.EachPrev(func(hook options.Hook) {
|
||||
if h, ok := hook.(server.HookHandler); ok {
|
||||
fn = h(fn)
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ func (g *Server) createSubHandler(sb *subscriber, opts server.Options) broker.Ha
|
||||
return nil
|
||||
}
|
||||
|
||||
opts.Hooks.EachNext(func(hook options.Hook) {
|
||||
opts.Hooks.EachPrev(func(hook options.Hook) {
|
||||
if h, ok := hook.(server.HookSubHandler); ok {
|
||||
fn = h(fn)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user