Documentation ¶
Index ¶
- Variables
- func Result1[T1 any](ret runtime.Ret) (T1, error)
- func Result10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, error)
- func Result11[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, error)
- func Result12[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, error)
- func Result13[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, error)
- func Result14[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, error)
- func Result15[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, error)
- func Result16[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, error)
- func Result2[T1, T2 any](ret runtime.Ret) (T1, T2, error)
- func Result3[T1, T2, T3 any](ret runtime.Ret) (T1, T2, T3, error)
- func Result4[T1, T2, T3, T4 any](ret runtime.Ret) (T1, T2, T3, T4, error)
- func Result5[T1, T2, T3, T4, T5 any](ret runtime.Ret) (T1, T2, T3, T4, T5, error)
- func Result6[T1, T2, T3, T4, T5, T6 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, error)
- func Result7[T1, T2, T3, T4, T5, T6, T7 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, T7, error)
- func Result8[T1, T2, T3, T4, T5, T6, T7, T8 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, T7, T8, error)
- func Result9[T1, T2, T3, T4, T5, T6, T7, T8, T9 any](ret runtime.Ret) (T1, T2, T3, T4, T5, T6, T7, T8, T9, error)
- func ResultVoid(ret runtime.Ret) error
- func Results(ret runtime.Ret) ([]any, error)
- type DistributedDeliverer
- func (d *DistributedDeliverer) Init(ctx service.Context)
- func (d *DistributedDeliverer) Match(ctx service.Context, dst, path string, oneWay bool) bool
- func (d *DistributedDeliverer) Notify(ctx service.Context, dst, path string, args []any) error
- func (d *DistributedDeliverer) Request(ctx service.Context, dst, path string, args []any) runtime.AsyncRet
- func (d *DistributedDeliverer) Shut(ctx service.Context)
- type DistributedDispatcher
- type IDeliverer
- type IDispatcher
- type IRPC
- type LifecycleInit
- type LifecycleShut
- type RPCOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Name = self.Name Using = self.Using Install = self.Install Uninstall = self.Uninstall )
View Source
var ( ErrPluginNotFound = errors.New("rpc: plugin not found") ErrMethodNotFound = errors.New("rpc: method not found") ErrComponentNotFound = errors.New("rpc: component not found") ErrMethodParameterCountMismatch = errors.New("rpc: method parameter count mismatch") ErrMethodParameterTypeMismatch = errors.New("rpc: method parameter type mismatch") )
View Source
var ( ErrMethodResultCountMismatch = errors.New("rpc: method result count mismatch") ErrMethodResultTypeMismatch = errors.New("rpc: method result type mismatch") )
View Source
var (
ErrNoDeliverer = errors.New("rpc: no deliverer") // 没有匹配的投递器
)
View Source
var With _Option
Functions ¶
func ResultVoid ¶
Types ¶
type DistributedDeliverer ¶
type DistributedDeliverer struct {
// contains filtered or unexported fields
}
DistributedDeliverer 分布式服务的RPC投递器
func (*DistributedDeliverer) Init ¶
func (d *DistributedDeliverer) Init(ctx service.Context)
Init 初始化
func (*DistributedDeliverer) Request ¶
func (d *DistributedDeliverer) Request(ctx service.Context, dst, path string, args []any) runtime.AsyncRet
Request 请求
func (*DistributedDeliverer) Shut ¶
func (d *DistributedDeliverer) Shut(ctx service.Context)
Shut 结束
type DistributedDispatcher ¶
type DistributedDispatcher struct {
// contains filtered or unexported fields
}
DistributedDispatcher 分布式服务的RPC分发器
func (*DistributedDispatcher) Init ¶
func (d *DistributedDispatcher) Init(ctx service.Context)
Init 初始化
func (*DistributedDispatcher) Shut ¶
func (d *DistributedDispatcher) Shut(ctx service.Context)
Shut 结束
type IDeliverer ¶
type IDeliverer interface { // Match 是否匹配 Match(ctx service.Context, dst, path string, oneWay bool) bool // Request 请求 Request(ctx service.Context, dst, path string, args []any) runtime.AsyncRet // Notify 通知 Notify(ctx service.Context, dst, path string, args []any) error }
IDeliverer RPC投递器接口,用于将RPC投递至目标
type IRPC ¶
type IRPC interface { // RPC RPC调用 RPC(dst, path string, args ...any) runtime.AsyncRet // OneWayRPC 单向RPC调用 OneWayRPC(dst, path string, args ...any) error }
IRPC RPC支持
type LifecycleInit ¶
LifecycleInit 生命周期开始
type LifecycleShut ¶
LifecycleShut 生命周期结束
type RPCOptions ¶
type RPCOptions struct { Deliverers []IDeliverer Dispatchers []IDispatcher }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.