rpcbroadcaster

package
v0.98.4-pre Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 5 Imported by: 0

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 request.RawParams
	// contains filtered or unexported fields
}

RPCBroadcaster represent generic RPC broadcaster.

func NewRPCBroadcaster

func NewRPCBroadcaster(log *zap.Logger, sendTimeout time.Duration) *RPCBroadcaster

NewRPCBroadcaster returns new RPC broadcaster instance.

func (*RPCBroadcaster) NewRPCClient

func (r *RPCBroadcaster) NewRPCClient(addr string, method SendMethod, timeout time.Duration, ch chan request.RawParams) *RPCClient

NewRPCClient returns new rpc client for provided address and method.

func (*RPCBroadcaster) Run

func (r *RPCBroadcaster) Run()

Run implements oracle.Broadcaster.

func (*RPCBroadcaster) Shutdown

func (r *RPCBroadcaster) Shutdown()

Shutdown implements oracle.Broadcaster.

type RPCClient

type RPCClient struct {
	// contains filtered or unexported fields
}

RPCClient represent rpc client for a single node.

type SendMethod

type SendMethod func(*client.Client, request.RawParams) error

SendMethod represents rpc method for sending data to other nodes.

Jump to

Keyboard shortcuts

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