Documentation
¶
Index ¶
- type Builder
- type Client
- func (c *Client) Close() error
- func (c *Client) Deliver(ctx context.Context, cid, uid int64, buf buffer.Buffer) error
- func (c *Client) GetState(ctx context.Context) (cluster.State, error)
- func (c *Client) SetState(ctx context.Context, state cluster.State) error
- func (c *Client) Trigger(ctx context.Context, event cluster.Event, cid, uid int64) error
- type ClientOptions
- type Provider
- type Server
- type ServerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(opts *ClientOptions) *Builder
func (*Builder) Build ¶
Build returns a client for addr, reusing a cached client when one already exists.
Dialing is bounded by the dial timeout so that an unreachable endpoint does not trigger indefinite retries. It returns errors.ErrClientClosed once the builder has been closed.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type ClientOptions ¶ added in v2.5.4
type ClientOptions = drpc.ClientOptions
type Provider ¶
type Provider interface {
// Trigger triggers an event.
Trigger(ctx context.Context, gid string, cid, uid int64, event cluster.Event) error
// Deliver delivers a message.
Deliver(ctx context.Context, gid, nid string, cid, uid int64, buf buffer.Buffer) error
// GetState returns the state.
GetState() (cluster.State, error)
// SetState sets the state.
SetState(state cluster.State) error
}
type ServerOptions ¶ added in v2.3.0
type ServerOptions = drpc.ServerOptions
Click to show internal directories.
Click to hide internal directories.