Documentation
¶
Index ¶
- Variables
- type Caller
- func (c *Caller) Done() (*Caller, error)
- func (c *Caller) IsPush() bool
- func (c *Caller) String() string
- func (c *Caller) WithArgs(args any) *Caller
- func (c *Caller) WithPayloadCodec(name string) *Caller
- func (c *Caller) WithPush() *Caller
- func (c *Caller) WithReply(reply any) *Caller
- func (c *Caller) WithTimeout(timeout time.Duration) *Caller
- type Client
- type ConnectHandle
- type DisconnectHandle
- type Option
- type Options
- type Req
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosing = errors.New("client is closing")
Functions ¶
This section is empty.
Types ¶
type Caller ¶
type Caller struct {
Node string
Addr *codec.Addr
Method string
Args any
Reply any
Timeout time.Duration
PayloadCodec codec.PayloadCodec
// contains filtered or unexported fields
}
func (*Caller) WithPayloadCodec ¶
WithPayloadCodec registered name, For this call only
type Client ¶
type ConnectHandle ¶ added in v1.0.1
type ConnectHandle func(remoteAddr string)
type DisconnectHandle ¶ added in v1.0.1
type DisconnectHandle func(remoteAddr string)
type Option ¶
type Option func(*Options)
func WithCallTimeout ¶
func WithConnectHandle ¶ added in v1.0.1
func WithConnectHandle(hdl ConnectHandle) Option
func WithDisConnectHandle ¶ added in v1.0.1
func WithDisConnectHandle(hdl DisconnectHandle) Option
func WithPayloadCodec ¶
func WithPayloadCodec(argsCodec codec.PayloadCodec) Option
type Options ¶
type Options struct {
PayloadCodec codec.PayloadCodec
CallTimeout time.Duration
ConnectHdle ConnectHandle
DisconnectHdle DisconnectHandle
}
Click to show internal directories.
Click to hide internal directories.