Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RPCBroadcaster ¶
type RPCBroadcaster struct { Clients map[string]*RPCClient Log *zap.Logger Responses chan []any // contains filtered or unexported fields }
RPCBroadcaster represents a generic RPC broadcaster.
func NewRPCBroadcaster ¶
func NewRPCBroadcaster(log *zap.Logger, sendTimeout time.Duration) *RPCBroadcaster
NewRPCBroadcaster returns a new RPC broadcaster instance.
func (*RPCBroadcaster) NewRPCClient ¶
func (r *RPCBroadcaster) NewRPCClient(addr string, method SendMethod, timeout time.Duration, ch chan []any) *RPCClient
NewRPCClient returns a new rpc client for the provided address and method.
func (*RPCBroadcaster) SendParams ¶ added in v0.99.1
func (r *RPCBroadcaster) SendParams(params []any)
SendParams sends a request using all clients if the broadcaster is active.
func (*RPCBroadcaster) Shutdown ¶
func (r *RPCBroadcaster) Shutdown()
Shutdown implements oracle.Broadcaster. The same instance can't be Run again after the shutdown.
Click to show internal directories.
Click to hide internal directories.