Documentation ¶
Index ¶
Constants ¶
View Source
const MetadataKey = "aop"
Variables ¶
This section is empty.
Functions ¶
func GetAllInterfaceMetadata ¶
func GetAllInterfaceMetadata() common.AllInterfaceMetadata
func GetMockProxyFunctionLayer ¶
func GetMockProxyFunctionLayer() func(func())
func RegisterAOP ¶
func RegisterAOP(aopImpl AOP)
Types ¶
type AOP ¶
type AOP struct { Name string // ConfigLoader is called during ioc.Load() when aop is enabled ConfigLoader func(config *common.Config) // InterceptorFactory is called after ConfigLoader is called, when bot aop and debug-server are enabled InterceptorFactory interceptorFactory // RPCInterceptorFactory is called after ConfigLoader is called, when bot aop and debug-server are enabled RPCInterceptorFactory rpcInterceptorFactory // GRPCServiceRegister is called after ConfigLoader is called, when bot aop and debug-server are enabled GRPCServiceRegister gRPCServiceRegister }
type Interceptor ¶
type Interceptor interface { BeforeInvoke(ctx *InvocationContext) AfterInvoke(ctx *InvocationContext) }
type InvocationContext ¶
type InvocationContext struct { ID uuid.UUID ProxyServicePtr interface{} SDID string MethodName string MethodFullName string Params []reflect.Value ReturnValues []reflect.Value GrID int64 Metadata map[string]interface{} }
func GetCurrentInvocationCtx ¶
func GetCurrentInvocationCtx() *InvocationContext
func NewInvocationContext ¶
func NewInvocationContext(proxyServicePtr interface{}, sdid, methodName, methodFullName string, params []reflect.Value) *InvocationContext
func (*InvocationContext) SetReturnValues ¶
func (c *InvocationContext) SetReturnValues(returnValues []reflect.Value)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.