Documentation ¶
Overview ¶
Package routing provides abstractions for routers on the AirDispatch network (translating addresses to server locations).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LookupType ¶
type LookupType string
LookupType wraps a string that determines which redirects are followed in the routing layer.
const ( LookupTypeTX LookupType = "TX" LookupTypeMAIL LookupType = "MAIL" LookupTypeALERT LookupType = "ALE" LookupTypeDEFAULT LookupType = "_" )
Different constants for the lookup types.
type Redirect ¶
type Redirect struct { Type LookupType Fingerprint string Alias string }
Redirect is a type of record on a Registration that alerts the client to send messages of a certain type to a different location.
type Router ¶
type Router interface { // Register function registers an identity with a router. Register(id *identity.Identity, alias string, redirects map[string]Redirect) error // Lookup function checks an address and returns an identity object. // Name is a type of lookup, either 'TX' for transfers, 'MAIL' for sending // mail 'ALE' for sending alerts, or '_' for default. Lookup(addr string, name LookupType) (*identity.Address, error) // Lookup function checks an alias and returns an identity object. LookupAlias(alias string, name LookupType) (*identity.Address, error) }
The Router provides a way for AirDispatch applications to translate aliases and address fingerprints to identity objects.
Click to show internal directories.
Click to hide internal directories.