Documentation ¶
Index ¶
- Variables
- func GetExtension() hook.Extension
- func GetHook() hook.Hook
- func InitOnceHook()
- type DefaultExtension
- type DefaultHook
- func (d DefaultHook) After(ctx context.Context, result interface{}, err error, fullMethod string) error
- func (d DefaultHook) Before(ctx context.Context, req interface{}, fullMethod string) (context.Context, error)
- func (d DefaultHook) Init(params map[string]string) error
- func (d DefaultHook) Mock(ctx context.Context, req interface{}, fullMethod string) (bool, interface{}, error)
- func (d DefaultHook) Release()
- func (d DefaultHook) VerifyAPIKey(key string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OpTypeKey = "op_type" DatabaseKey = "database" UsernameKey = "username" RequestDataSizeKey = "request_data_size" ResultDataSizeKey = "result_data_size" RelatedDataSizeKey = "related_data_size" SuccessCntKey = "success_cnt" FailCntKey = "fail_cnt" RelatedCntKey = "related_cnt" NodeIDKey = "id" OpTypeInsert = "insert" OpTypeDelete = "delete" OpTypeUpsert = "upsert" OpTypeQuery = "query" OpTypeSearch = "search" OpTypeHybridSearch = "hybrid_search" OpTypeNodeID = "node_id" )
Functions ¶
func GetExtension ¶
GetHook returns singleton hook.Extension instance.
func InitOnceHook ¶
func InitOnceHook()
Types ¶
type DefaultExtension ¶
type DefaultExtension struct{}
func (DefaultExtension) Report ¶
func (d DefaultExtension) Report(info any) int
type DefaultHook ¶
type DefaultHook struct{}
func (DefaultHook) Release ¶
func (d DefaultHook) Release()
func (DefaultHook) VerifyAPIKey ¶
func (d DefaultHook) VerifyAPIKey(key string) (string, error)
Click to show internal directories.
Click to hide internal directories.