Documentation
¶
Index ¶
- type Builder
- func (builder *Builder) Build() *Node
- func (builder *Builder) WithAddr(addr wire.Address) *Builder
- func (builder *Builder) WithHost(host string) *Builder
- func (builder *Builder) WithListener(listener gossip.Listener) *Builder
- func (builder *Builder) WithPort(port uint16) *Builder
- func (builder *Builder) WithPrivKey(privKey *ecdsa.PrivateKey) *Builder
- type Node
- func (node *Node) Addr() wire.Address
- func (node *Node) Broadcast(ctx context.Context, subnet id.Hash, data []byte)
- func (node *Node) DHT() dht.DHT
- func (node *Node) Gossiper() *gossip.Gossiper
- func (node *Node) Identity() id.Signatory
- func (node *Node) Peer() *peer.Peer
- func (node *Node) Run(ctx context.Context)
- func (node *Node) Send(ctx context.Context, signatory id.Signatory, data []byte)
- func (node *Node) Transport() *transport.Transport
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶ added in v0.4.0
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) WithListener ¶ added in v0.4.0
func (*Builder) WithPrivKey ¶ added in v0.4.0
func (builder *Builder) WithPrivKey(privKey *ecdsa.PrivateKey) *Builder
type Node ¶ added in v0.4.0
type Node struct {
// contains filtered or unexported fields
}
type Options ¶ added in v0.4.0
type Options struct {
Logger logrus.FieldLogger
}
func DefaultOptions ¶ added in v0.4.0
func DefaultOptions() Options
func (Options) WithLogger ¶ added in v0.4.0
func (opts Options) WithLogger(logger logrus.FieldLogger) Options
Click to show internal directories.
Click to hide internal directories.