delivery

package
v0.0.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHandleFuncMethods

func GetHandleFuncMethods(s interface{}) []interface{}

func IsHandleFuncType

func IsHandleFuncType(f interface{}) error

Types

type HandleContextKey added in v0.0.19

type HandleContextKey string

type HandleFuncInfo

type HandleFuncInfo struct {
	ReqName string
	NewReq  func() proto.Message
	Call    func(context.Context, proto.Message) (proto.Message, error)
}

func GetHandleFuncInfo

func GetHandleFuncInfo(f interface{}) (*HandleFuncInfo, error)

f type must be HandleFuncType

func GetHandleFuncInfoByFunc added in v0.0.38

func GetHandleFuncInfoByFunc[ReqT proto.Message, RspT proto.Message](handle func(context.Context, ReqT) (RspT, error)) *HandleFuncInfo

func (*HandleFuncInfo) CallHandlePanic added in v0.0.44

func (o *HandleFuncInfo) CallHandlePanic(ctx context.Context, req proto.Message) (rsp proto.Message, err error)

type HandleFuncType

type HandleFuncType[ReqT proto.Message, RspT proto.Message] func(ctx context.Context, req ReqT) (RspT, error)

type OnHandleFinishedFuncType added in v0.0.18

type OnHandleFinishedFuncType func(ctx context.Context, req, rsp proto.Message, callErr error, isExpectedError bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL