Documentation
¶
Index ¶
- type Option
- func WithAddProtocolFunc(f func(p2p.ProtocolSpec) error) Option
- func WithAddressesFunc(f func() ([]ma.Multiaddr, error)) Option
- func WithConnectFunc(...) Option
- func WithDisconnectFunc(f func(overlay swarm.Address) error) Option
- func WithPeersFunc(f func() []p2p.Peer) Option
- func WithSetNotifierFunc(f func(topology.Notifier)) Option
- type Service
- func (s *Service) AddProtocol(spec p2p.ProtocolSpec) error
- func (s *Service) Addresses() ([]ma.Multiaddr, error)
- func (s *Service) Connect(ctx context.Context, addr ma.Multiaddr) (address *bzz.Address, err error)
- func (s *Service) Disconnect(overlay swarm.Address) error
- func (s *Service) Peers() []p2p.Peer
- func (s *Service) SetNotifier(f topology.Notifier)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithAddProtocolFunc ¶
func WithAddProtocolFunc(f func(p2p.ProtocolSpec) error) Option
func WithConnectFunc ¶
func WithPeersFunc ¶
func WithSetNotifierFunc ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) AddProtocol ¶
func (s *Service) AddProtocol(spec p2p.ProtocolSpec) error
func (*Service) SetNotifier ¶
Click to show internal directories.
Click to hide internal directories.