Documentation ¶
Index ¶
- func InitRouter(opts RouterOptions) (routing.Router, error)
- func NewMessageRouter(scan *NetworkScan) message.Router
- func RouteAccount(table *protocol.RoutingTable, account *url.URL) (string, error)
- type AnchorData
- func (v *AnchorData) Copy() *AnchorData
- func (v *AnchorData) CopyAsInterface() interface{}
- func (v *AnchorData) Equal(u *AnchorData) bool
- func (v *AnchorData) IsValid() error
- func (v *AnchorData) MarshalBinary() ([]byte, error)
- func (v *AnchorData) MarshalJSON() ([]byte, error)
- func (v *AnchorData) UnmarshalBinary(data []byte) error
- func (v *AnchorData) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *AnchorData) UnmarshalJSON(b []byte) error
- type ChainData
- func (v *ChainData) Copy() *ChainData
- func (v *ChainData) CopyAsInterface() interface{}
- func (v *ChainData) Equal(u *ChainData) bool
- func (v *ChainData) IsValid() error
- func (v *ChainData) MarshalBinary() ([]byte, error)
- func (v *ChainData) MarshalJSON() ([]byte, error)
- func (v *ChainData) UnmarshalBinary(data []byte) error
- func (v *ChainData) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *ChainData) UnmarshalJSON(b []byte) error
- type MessageData
- func (v *MessageData) Copy() *MessageData
- func (v *MessageData) CopyAsInterface() interface{}
- func (v *MessageData) Equal(u *MessageData) bool
- func (v *MessageData) IsValid() error
- func (v *MessageData) MarshalBinary() ([]byte, error)
- func (v *MessageData) MarshalJSON() ([]byte, error)
- func (v *MessageData) UnmarshalBinary(data []byte) error
- func (v *MessageData) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *MessageData) UnmarshalJSON(b []byte) error
- type NetworkScan
- type RouterOptions
- type StaticDialer
- type TimestampService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRouter ¶
func InitRouter(opts RouterOptions) (routing.Router, error)
InitRouter initializes a router. If an event bus is provided, InitRouter will use that. Otherwise, InitRouter will use the node to query the network to determine the initial routing table.
func NewMessageRouter ¶ added in v1.4.0
func NewMessageRouter(scan *NetworkScan) message.Router
func RouteAccount ¶
Types ¶
type AnchorData ¶ added in v1.4.0
type AnchorData struct { Block uint64 `json:"block,omitempty" form:"block" query:"block" validate:"required"` Time time.Time `json:"time,omitempty" form:"time" query:"time" validate:"required"` // contains filtered or unexported fields }
func (*AnchorData) Copy ¶ added in v1.4.0
func (v *AnchorData) Copy() *AnchorData
func (*AnchorData) CopyAsInterface ¶ added in v1.4.0
func (v *AnchorData) CopyAsInterface() interface{}
func (*AnchorData) Equal ¶ added in v1.4.0
func (v *AnchorData) Equal(u *AnchorData) bool
func (*AnchorData) IsValid ¶ added in v1.4.0
func (v *AnchorData) IsValid() error
func (*AnchorData) MarshalBinary ¶ added in v1.4.0
func (v *AnchorData) MarshalBinary() ([]byte, error)
func (*AnchorData) MarshalJSON ¶ added in v1.4.0
func (v *AnchorData) MarshalJSON() ([]byte, error)
func (*AnchorData) UnmarshalBinary ¶ added in v1.4.0
func (v *AnchorData) UnmarshalBinary(data []byte) error
func (*AnchorData) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *AnchorData) UnmarshalBinaryFrom(rd io.Reader) error
func (*AnchorData) UnmarshalJSON ¶ added in v1.4.0
func (v *AnchorData) UnmarshalJSON(b []byte) error
type ChainData ¶ added in v1.4.0
type ChainData struct { Account *url.URL `json:"account,omitempty" form:"account" query:"account" validate:"required"` Chain string `json:"chain,omitempty" form:"chain" query:"chain" validate:"required"` Block uint64 `json:"block,omitempty" form:"block" query:"block" validate:"required"` Time time.Time `json:"time,omitempty" form:"time" query:"time" validate:"required"` // contains filtered or unexported fields }
func (*ChainData) CopyAsInterface ¶ added in v1.4.0
func (v *ChainData) CopyAsInterface() interface{}
func (*ChainData) MarshalBinary ¶ added in v1.4.0
func (*ChainData) MarshalJSON ¶ added in v1.4.0
func (*ChainData) UnmarshalBinary ¶ added in v1.4.0
func (*ChainData) UnmarshalBinaryFrom ¶ added in v1.4.0
func (*ChainData) UnmarshalJSON ¶ added in v1.4.0
type MessageData ¶ added in v1.4.0
type MessageData struct { LastUpdated time.Time `json:"lastUpdated,omitempty" form:"lastUpdated" query:"lastUpdated" validate:"required"` Chains []*ChainData `json:"chains" form:"chains" query:"chains" validate:"required"` // contains filtered or unexported fields }
func (*MessageData) Copy ¶ added in v1.4.0
func (v *MessageData) Copy() *MessageData
func (*MessageData) CopyAsInterface ¶ added in v1.4.0
func (v *MessageData) CopyAsInterface() interface{}
func (*MessageData) Equal ¶ added in v1.4.0
func (v *MessageData) Equal(u *MessageData) bool
func (*MessageData) IsValid ¶ added in v1.4.0
func (v *MessageData) IsValid() error
func (*MessageData) MarshalBinary ¶ added in v1.4.0
func (v *MessageData) MarshalBinary() ([]byte, error)
func (*MessageData) MarshalJSON ¶ added in v1.4.0
func (v *MessageData) MarshalJSON() ([]byte, error)
func (*MessageData) UnmarshalBinary ¶ added in v1.4.0
func (v *MessageData) UnmarshalBinary(data []byte) error
func (*MessageData) UnmarshalBinaryFrom ¶ added in v1.4.0
func (v *MessageData) UnmarshalBinaryFrom(rd io.Reader) error
func (*MessageData) UnmarshalJSON ¶ added in v1.4.0
func (v *MessageData) UnmarshalJSON(b []byte) error
type NetworkScan ¶ added in v1.4.0
type NetworkScan = healing.NetworkInfo
func LoadNetworkScan ¶ added in v1.4.0
func LoadNetworkScan(file string) (*NetworkScan, error)
type RouterOptions ¶ added in v1.4.0
type StaticDialer ¶ added in v1.4.0
type StaticDialer struct { Scan *healing.NetworkInfo Dialer message.Dialer Nodes api.NodeService // contains filtered or unexported fields }
type TimestampService ¶ added in v1.4.0
func (*TimestampService) GetTimestamp ¶ added in v1.4.0
func (s *TimestampService) GetTimestamp(ctx context.Context, id *url.TxID) (_ *MessageData, err error)
Click to show internal directories.
Click to hide internal directories.