Help us shape the future of Go! Take the 2026 Go Developer Survey

features

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: AGPL-3.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterLazy added in v0.7.0

func RegisterLazy[T any](registry types.ServiceRegistry, activatorFunc func() T, _ types.LifetimeScope) error

func RegisterList added in v0.7.1

func RegisterList[T any](registry types.ServiceRegistry) error

func RegisterNamed

func RegisterNamed[T any](registry types.ServiceRegistry, services ...registration.NamedServiceRegistrationFunc) error

Types

type Interceptor added in v0.8.1

type Interceptor interface {
	Name() string
	Position() int
}

type InterceptorBase added in v0.8.1

type InterceptorBase struct {
	// contains filtered or unexported fields
}

func NewInterceptorBase added in v0.8.1

func NewInterceptorBase(name string, position int) InterceptorBase

func (InterceptorBase) Name added in v0.8.1

func (i InterceptorBase) Name() string

func (InterceptorBase) Position added in v0.8.1

func (i InterceptorBase) Position() int

type Lazy added in v0.7.0

type Lazy[T any] interface {
	Value() T
}

type MethodCallContext added in v0.8.1

type MethodCallContext struct {
	// contains filtered or unexported fields
}

func NewMethodCallContext added in v0.8.1

func NewMethodCallContext(methodName string, parameters map[string]interface{}) *MethodCallContext

type MethodInterceptor added in v0.8.1

type MethodInterceptor interface {
	Interceptor
	Enter(target any, methodName string, parameters []ParameterInfo)
	Exit(target any, methodName string, returnValues []ReturnValueInfo)
	OnError(target any, methodName string, err error)
}

type ParameterInfo added in v0.8.1

type ParameterInfo struct {
	// contains filtered or unexported fields
}

func (ParameterInfo) String added in v0.8.1

func (p ParameterInfo) String() string

type ProxyBase added in v0.8.1

type ProxyBase struct {
	// contains filtered or unexported fields
}

func NewProxyBase added in v0.8.1

func NewProxyBase[T any](target T, interceptors []MethodInterceptor) ProxyBase

func (*ProxyBase) InvokeEnterMethodInterceptors added in v0.8.1

func (p *ProxyBase) InvokeEnterMethodInterceptors(callContext *MethodCallContext)

func (*ProxyBase) InvokeExitMethodInterceptors added in v0.8.1

func (p *ProxyBase) InvokeExitMethodInterceptors(callContext *MethodCallContext)

func (*ProxyBase) InvokeMethodErrorInterceptors added in v0.8.1

func (p *ProxyBase) InvokeMethodErrorInterceptors(callContext *MethodCallContext, returnValues ...interface{})

type ReturnValueInfo added in v0.8.1

type ReturnValueInfo struct {
	// contains filtered or unexported fields
}

func (ReturnValueInfo) String added in v0.8.1

func (r ReturnValueInfo) String() string

Jump to

Keyboard shortcuts

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