milvus/api/hook/hook.go
SimFG 662c654fe3
Add the context param for the hook interceptor (#19405)
Signed-off-by: SimFG <bang.fu@zilliz.com>

Signed-off-by: SimFG <bang.fu@zilliz.com>
2022-09-24 09:56:51 +08:00

12 lines
350 B
Go

package hook
import "context"
type Hook interface {
Init(params map[string]string) error
Mock(ctx context.Context, req interface{}, fullMethod string) (bool, interface{}, error)
Before(ctx context.Context, req interface{}, fullMethod string) error
After(ctx context.Context, result interface{}, err error, fullMethod string) error
Release()
}