Documentation
¶
Index ¶
- Variables
- func RegisterIntent[I loki.EphemeralType]()
- func RegisterIntentImpl[I, M loki.EphemeralType]()
- type ED25519Key
- type Engine
- func (e *Engine) Accept(conn io.ReadWriteCloser) (err error)
- func (e *Engine) AcceptPeer(peer Signer)
- func (e *Engine) Dial(conn io.ReadWriteCloser) (err error)
- func (e *Engine) Next(ctx context.Context, intents []loki.EphemeralType) ([]Event, error)
- func (e *Engine) Pause() bool
- func (e *Engine) RejectPeer(peer Signer)
- func (e *Engine) Resume()
- func (e *Engine) Stop()
- type Event
- type ID
- type PeerAccepted
- type PeerConnected
- type PeerRejected
- type Signer
- type Tick
- type UDP
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrStopped = fmt.Errorf("stopped") ErrPaused = fmt.Errorf("paused") )
Functions ¶
func RegisterIntent ¶
func RegisterIntent[I loki.EphemeralType]()
func RegisterIntentImpl ¶
func RegisterIntentImpl[I, M loki.EphemeralType]()
Types ¶
type ED25519Key ¶
type ED25519Key struct {
Key []byte
// contains filtered or unexported fields
}
func NewED25519Key ¶
func NewED25519Key() (*ED25519Key, error)
func (*ED25519Key) ID ¶
func (k *ED25519Key) ID() ID
func (*ED25519Key) Public ¶
func (k *ED25519Key) Public() Signer
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) AcceptPeer ¶
Accept votes to accept the peer. All other (active) peers must vote to accept before the peer is accepted.
func (*Engine) RejectPeer ¶
Reject votes to reject the peer. All other (active) peers other than the one being rejected must vote to accept before the peer is accepted.
type PeerAccepted ¶
type PeerAccepted struct{ Peer Signer }
type PeerConnected ¶
type PeerConnected struct{ Peer Signer }
type PeerRejected ¶
type PeerRejected struct{ Peer Signer }
type Tick ¶
type Tick struct {
Intents map[ID][]loki.EphemeralType
}
Click to show internal directories.
Click to hide internal directories.