Documentation ¶
Index ¶
- type Config
- type IncomingPeerConnect
- type IncomingTankagram
- type NetworkBackend
- type NewMarketSubscriber
- type TankaClient
- func (c *TankaClient) AddTatankaNode(ctx context.Context, peerID tanka.PeerID, uri string, cert []byte) error
- func (c *TankaClient) Auth(peerID tanka.PeerID) error
- func (c *TankaClient) Broadcast(topic tanka.Topic, subject tanka.Subject, msgType mj.BroadcastMessageType, ...) error
- func (c *TankaClient) Connect(ctx context.Context) (*sync.WaitGroup, error)
- func (c *TankaClient) ConnectPeer(peerID tanka.PeerID, hosts ...tanka.PeerID) (*mj.TankagramResult, error)
- func (c *TankaClient) FiatRate(assetID uint32) float64
- func (c *TankaClient) ID() tanka.PeerID
- func (c *TankaClient) Next() <-chan interface{}
- func (c *TankaClient) PostBond(bond *tanka.Bond) error
- func (c *TankaClient) SendTankagram(peerID tanka.PeerID, msg *msgjson.Message) (_ *mj.TankagramResult, _ json.RawMessage, err error)
- func (c *TankaClient) SubscribeMarket(baseID, quoteID uint32) error
- func (c *TankaClient) SubscribeToFiatRates() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IncomingPeerConnect ¶
IncomingPeerConnect will be emitted when a peer requests a connection for the transmission of tankagrams.
type IncomingTankagram ¶
IncomingTankagram will be emitted when we receive a tankagram from a connected peer.
type NetworkBackend ¶
type NetworkBackend interface { Send(*msgjson.Message) error Request(msg *msgjson.Message, respHandler func(*msgjson.Message)) error }
NetworkBackend represents a peer's communication protocol.
type NewMarketSubscriber ¶
NewMarketSubscriber will be emitted when a new client subscribes to a market.
type TankaClient ¶
type TankaClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg *Config) *TankaClient
func (*TankaClient) AddTatankaNode ¶
func (*TankaClient) Broadcast ¶
func (c *TankaClient) Broadcast(topic tanka.Topic, subject tanka.Subject, msgType mj.BroadcastMessageType, thing interface{}) error
func (*TankaClient) ConnectPeer ¶
func (c *TankaClient) ConnectPeer(peerID tanka.PeerID, hosts ...tanka.PeerID) (*mj.TankagramResult, error)
func (*TankaClient) FiatRate ¶
func (c *TankaClient) FiatRate(assetID uint32) float64
func (*TankaClient) ID ¶
func (c *TankaClient) ID() tanka.PeerID
func (*TankaClient) Next ¶
func (c *TankaClient) Next() <-chan interface{}
func (*TankaClient) SendTankagram ¶
func (c *TankaClient) SendTankagram(peerID tanka.PeerID, msg *msgjson.Message) (_ *mj.TankagramResult, _ json.RawMessage, err error)
func (*TankaClient) SubscribeMarket ¶
func (c *TankaClient) SubscribeMarket(baseID, quoteID uint32) error
func (*TankaClient) SubscribeToFiatRates ¶
func (c *TankaClient) SubscribeToFiatRates() error
Click to show internal directories.
Click to hide internal directories.