client

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

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

Jump to

Keyboard shortcuts

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