Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWithPubsub ¶
NewWtihPubsub creates a gossip randomness client.
func (*Client) Sub ¶
func (c *Client) Sub(ch chan drand.PublicRandResponse) UnsubFunc
Sub subscribes to notfications about new randomness. Client instnace owns the channel after it is passed to Sub function, thus the channel should not be closed by library user
It is recommended to use a buffered channel. If the channel is full, notification about randomness will be dropped.
Notification channels will be closed when the client is Closed
Click to show internal directories.
Click to hide internal directories.