Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface { Public(p Peer, in *drand.PublicRandRequest) (*drand.PublicRandResponse, error) Private(p Peer, in *drand.PrivateRandRequest) (*drand.PrivateRandResponse, error) NewBeacon(p Peer, in *drand.BeaconRequest) (*drand.BeaconResponse, error) Setup(p Peer, in *dkg.DKGPacket) (*dkg.DKGResponse, error) }
Client represents all methods that are callable on drand nodes
func NewGrpcClient ¶
func NewGrpcClient(opts ...grpc.DialOption) Client
NewGrpcClient returns a Client using gRPC connections
type Gateway ¶
Gateway is the main interface to communicate to the drand world. It acts as a listener to receive incoming requests and acts a client connecting to drand particpants. The gateway fixes all drand functionalities offered by drand.
func NewGrpcGateway ¶
func NewGrpcGateway(listen string, s Service, opts ...grpc.DialOption) Gateway
type Listener ¶
type Listener interface { Start() Stop() Service }
Listener is the active listener for incoming requests.
func NewGrpcListener ¶
NewGrpcListener returns a new Listener from the given network Listener and some options that may be necessary to gRPC. The caller should preferable use NewTCPGrpcListener or NewTLSgRPCListener.
func NewTCPGrpcListener ¶
NewTCPGrpcListener returns a gRPC listener using plain TCP connections without TLS. The listener will bind to the given address:port tuple.
type Peer ¶
type Peer interface {
Address() string
}
Peer is a simple interface that allows retrieving the address of a destination. It might further e enhanced with certificates properties and all.
type Service ¶
type Service interface { drand.RandomnessServer drand.BeaconServer dkg.DkgServer }
Service holds all functionalities that a drand node should implement