router

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoverRoutes

type DiscoverRoutes interface {
	// Directive indicates DiscoverRoutes is a directive.
	directive.Directive

	// DiscoverRoutesLocalPeerID returns the local peer ID we are
	// routing from.
	DiscoverRoutesLocalPeerID() peer.ID
	// DiscoverRoutesRemotePeerID returns the remote peer ID we are
	// attempting to route to.
	DiscoverRoutesRemotePeerID() peer.ID
}

DiscoverRoutes is a directive to discover routes to a peer.

type DiscoverRoutesWithPeerIDs

type DiscoverRoutesWithPeerIDs struct {
	// contains filtered or unexported fields
}

DiscoverRoutesWithPeerIDs implements DiscoverRoutes with a protocol ID and peer ID.

func NewDiscoverRoutesWithPeerIDs

func NewDiscoverRoutesWithPeerIDs(
	protocolID protocol.ID,
	localPeerID, remotePeerID peer.ID,
) *DiscoverRoutesWithPeerIDs

NewDiscoverRoutesWithPeerIDs constructs a new DiscoverRoutesWithPeerIDs directive.

func (*DiscoverRoutesWithPeerIDs) DiscoverRoutesLocalPeerID

func (d *DiscoverRoutesWithPeerIDs) DiscoverRoutesLocalPeerID() peer.ID

DiscoverRoutesLocalPeerID returns the local peer ID we are requesting a handler for. Cannot be empty.

func (*DiscoverRoutesWithPeerIDs) DiscoverRoutesRemotePeerID

func (d *DiscoverRoutesWithPeerIDs) DiscoverRoutesRemotePeerID() peer.ID

DiscoverRoutesRemotePeerID returns the remote peer ID we are requesting a handler for. Cannot be empty.

func (*DiscoverRoutesWithPeerIDs) GetDebugVals

GetDebugString returns the directive arguments stringified. This should be something like param1="test", param2="test". This is not necessarily unique, and is primarily intended for display.

func (*DiscoverRoutesWithPeerIDs) GetName

func (d *DiscoverRoutesWithPeerIDs) GetName() string

GetName returns the directive's type name. This is not necessarily unique, and is primarily intended for display.

func (*DiscoverRoutesWithPeerIDs) GetValueOptions

func (d *DiscoverRoutesWithPeerIDs) GetValueOptions() directive.ValueOptions

GetValueOptions returns options relating to value handling.

func (*DiscoverRoutesWithPeerIDs) IsEquivalent

func (d *DiscoverRoutesWithPeerIDs) IsEquivalent(other directive.Directive) bool

IsEquivalent checks if the other directive is equivalent. If two directives are equivalent, and the new directive does not superceed the old, then the new directive will be merged (de-duplicated) into the old.

func (*DiscoverRoutesWithPeerIDs) Superceeds

func (d *DiscoverRoutesWithPeerIDs) Superceeds(other directive.Directive) bool

Superceeds checks if the directive overrides another. The other directive will be canceled if superceded.

func (*DiscoverRoutesWithPeerIDs) Validate

func (d *DiscoverRoutesWithPeerIDs) Validate() error

Validate validates the directive. This is a cursory validation to see if the values "look correct."

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL