processor

package
v0.1.34 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: LGPL-2.1 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDistEntityNotFound       = errors.New("rpc: distributed entity node not found")
	ErrForwardToServiceNotFound = errors.New("rpc: the forwarding to the service node is not found")
	ErrIncorrectDestAddress     = errors.New("rpc: incorrect destination AddressDetails")
)
View Source
var (
	ErrSessionNotFound = errors.New("rpc: entity routing to session not found")
	ErrGroupChanIsFull = errors.New("rpc: group send data channel is full")
	ErrGroupNotFound   = errors.New("rpc: group not found")
)
View Source
var (
	ErrNoDeliverer = errors.New("rpc: no deliverer")         // 没有匹配的投递器
	ErrTerminated  = errors.New("rpc: deliverer terminated") // 已终止投递
)
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 (
	ErrEntityNotFound = errors.New("rpc: session routing to entity not found")
)

Functions

This section is empty.

Types

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投递至目标

func NewForwardingDeliverer

func NewForwardingDeliverer(forwardService string) IDeliverer

NewForwardingDeliverer RPC转发器,用于S->C的通信

func NewServiceDeliverer

func NewServiceDeliverer() IDeliverer

NewServiceDeliverer 创建分布式服务间的RPC投递器

type IDispatcher

type IDispatcher any

IDispatcher RPC分发器接口,用于分发RPC请求与响应

func NewInboundDispatcher

func NewInboundDispatcher(mc gap.IMsgCreator) IDispatcher

NewInboundDispatcher 创建入站方向RPC分发器,用于C->S的通信

func NewOutboundDispatcher

func NewOutboundDispatcher() IDispatcher

NewOutboundDispatcher 创建出站方向RPC分发器,用于S->C的通信

func NewServiceDispatcher

func NewServiceDispatcher() IDispatcher

NewServiceDispatcher 创建分布式服务间的RPC分发器

type LifecycleInit

type LifecycleInit interface {
	Init(ctx service.Context)
}

LifecycleInit RPC投递器或分发器生命周期开始

type LifecycleShut

type LifecycleShut interface {
	Shut(ctx service.Context)
}

LifecycleShut RPC投递器或分发器生命周期结束

Jump to

Keyboard shortcuts

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