Documentation
¶
Overview ¶
Package client @Title 消息发送器 @Description 用来向对应的服务发送消息 @Author yr 2024/11/7 @Update yr 2024/11/7
Package client @Title 本地服务的Client @Description 本地服务的Client,调用时直接使用rpcHandler发往对应的service @Author yr 2024/9/3 下午4:26 @Update yr 2024/9/3 下午4:26
Package client @Title title @Description desc @Author yr 2024/12/3 @Update yr 2024/12/3
Package client @Title title @Description desc @Author yr 2024/12/3 @Update yr 2024/12/3
Package client @Title 远程服务的Client @Description 远程服务的Client @Author yr 2024/9/3 下午4:26 @Update yr 2024/9/3 下午4:26
Index ¶
- func Close()
- func NewDispatcher(pid *actor.PID, mailbox inf.IMailboxChannel) inf.IRpcDispatcher
- func NewTmpDispatcher(pid *actor.PID, mailbox inf.IMailboxChannel) inf.IRpcDispatcher
- func Register(tp string, creator SenderCreator)
- type Dispatcher
- func (c *Dispatcher) Close()
- func (c *Dispatcher) GetPid() *actor.PID
- func (c *Dispatcher) IsClosed() bool
- func (c *Dispatcher) SendRequest(envelope inf.IEnvelope) error
- func (c *Dispatcher) SendRequestAndRelease(envelope inf.IEnvelope) error
- func (c *Dispatcher) SendResponse(envelope inf.IEnvelope) error
- func (c *Dispatcher) SetPid(pid *actor.PID)
- type SenderCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDispatcher ¶
func NewDispatcher(pid *actor.PID, mailbox inf.IMailboxChannel) inf.IRpcDispatcher
func NewTmpDispatcher ¶
func NewTmpDispatcher(pid *actor.PID, mailbox inf.IMailboxChannel) inf.IRpcDispatcher
func Register ¶
func Register(tp string, creator SenderCreator)
Register 注册消息发送器(目前由于都是在启动阶段注册,没有动态注册,所以就没有给锁,后面有需求再改)
Types ¶
type Dispatcher ¶
type Dispatcher struct {
inf.IMailboxChannel
// contains filtered or unexported fields
}
func (*Dispatcher) Close ¶
func (c *Dispatcher) Close()
func (*Dispatcher) GetPid ¶
func (c *Dispatcher) GetPid() *actor.PID
func (*Dispatcher) IsClosed ¶
func (c *Dispatcher) IsClosed() bool
func (*Dispatcher) SendRequest ¶
func (c *Dispatcher) SendRequest(envelope inf.IEnvelope) error
func (*Dispatcher) SendRequestAndRelease ¶
func (c *Dispatcher) SendRequestAndRelease(envelope inf.IEnvelope) error
func (*Dispatcher) SendResponse ¶
func (c *Dispatcher) SendResponse(envelope inf.IEnvelope) error
func (*Dispatcher) SetPid ¶
func (c *Dispatcher) SetPid(pid *actor.PID)
type SenderCreator ¶
type SenderCreator func(addr string) inf.IRpcSender
Click to show internal directories.
Click to hide internal directories.