Documentation ¶
Index ¶
- type Single
- func (s *Single) Choose(context.Context, *transport.Request) (peer.Peer, func(error), error)
- func (s *Single) Introspect() introspection.ChooserStatus
- func (s *Single) IsRunning() bool
- func (s *Single) NotifyStatusChanged(_ peer.Identifier)
- func (s *Single) Start() error
- func (s *Single) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Single ¶ added in v1.0.0
type Single struct {
// contains filtered or unexported fields
}
Single implements the Chooser interface for a single peer
func NewSingle ¶ added in v1.0.0
func NewSingle(pid peer.Identifier, transport peer.Transport) *Single
NewSingle creates a static Chooser with a single Peer
func (*Single) Introspect ¶ added in v1.0.0
func (s *Single) Introspect() introspection.ChooserStatus
Introspect returns a ChooserStatus with a single PeerStatus.
func (*Single) NotifyStatusChanged ¶ added in v1.0.0
func (s *Single) NotifyStatusChanged(_ peer.Identifier)
NotifyStatusChanged receives notifications from the transport when the peer connects, disconnects, accepts a request, and so on.
Directories ¶
Path | Synopsis |
---|---|
Package x contains experimental components.
|
Package x contains experimental components. |
Click to show internal directories.
Click to hide internal directories.