milvus/api/hook/hook.go
SimFG 9d40be7e67
Support to modify the context param in the hook interceptor (#19495)
Signed-off-by: SimFG <bang.fu@zilliz.com>

Signed-off-by: SimFG <bang.fu@zilliz.com>
2022-09-28 13:26:54 +08:00

12 lines
369 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) (context.Context, error)
After(ctx context.Context, result interface{}, err error, fullMethod string) error
Release()
}