Documentation
¶
Index ¶
- Variables
- type Node
- func (node *Node) AddChannel(name string, privkey string) error
- func (node *Node) AddChunk(streamID uint32, chunkNum uint32, data []byte) error
- func (node *Node) AddContact(name string, key string) error
- func (node *Node) AddPeer(name string, enabled bool, uri string, group ...string) error
- func (node *Node) AddProfile(name string, enabled bool) error
- func (node *Node) AddStream(streamID uint32, totalChunks uint32, channelName string) error
- func (node *Node) AdminRPC(transport api.Transport, call api.RemoteCall) (interface{}, error)
- func (node *Node) BootstrapDB(dbAdapter, dbConnectionString string) db.Session
- func (node *Node) CID() (bc.PubKey, error)
- func (node *Node) DeleteChannel(name string) error
- func (node *Node) DeleteContact(name string) error
- func (node *Node) DeletePeer(name string) error
- func (node *Node) DeleteProfile(name string) error
- func (node *Node) Dropoff(bundle api.Bundle) error
- func (node *Node) Events() chan api.Event
- func (node *Node) Export() ([]byte, error)
- func (node *Node) FlushOutbox(maxAgeSeconds int64)
- func (node *Node) Forward(msg api.Msg) error
- func (node *Node) GetChannel(name string) (*api.Channel, error)
- func (node *Node) GetChannelPrivKey(name string) (string, error)
- func (node *Node) GetChannels() ([]api.Channel, error)
- func (node *Node) GetContact(name string) (*api.Contact, error)
- func (node *Node) GetContacts() ([]api.Contact, error)
- func (node *Node) GetPeer(name string) (*api.Peer, error)
- func (node *Node) GetPeers(group ...string) ([]api.Peer, error)
- func (node *Node) GetPolicies() []api.Policy
- func (node *Node) GetProfile(name string) (*api.Profile, error)
- func (node *Node) GetProfiles() ([]api.Profile, error)
- func (node *Node) Handle(msg api.Msg) (bool, error)
- func (node *Node) ID() (bc.PubKey, error)
- func (node *Node) Import(jsonConfig []byte) error
- func (node *Node) In() chan api.Msg
- func (node *Node) IsRunning() bool
- func (node *Node) LoadProfile(name string) (bc.PubKey, error)
- func (node *Node) Out() chan api.Msg
- func (node *Node) Pickup(rpub bc.PubKey, lastTime int64, maxBytes int64, channelNames ...string) (api.Bundle, error)
- func (node *Node) PublicRPC(transport api.Transport, call api.RemoteCall) (interface{}, error)
- func (node *Node) Router() api.Router
- func (node *Node) Send(contactName string, data []byte, pubkey ...bc.PubKey) error
- func (node *Node) SendBulk(contactName string, data [][]byte, pubkey ...bc.PubKey) error
- func (node *Node) SendChannel(channelName string, data []byte, pubkey ...bc.PubKey) error
- func (node *Node) SendChannelBulk(channelName string, data [][]byte, pubkey ...bc.PubKey) error
- func (node *Node) SendMsg(msg api.Msg) error
- func (node *Node) SetPolicy(policies ...api.Policy)
- func (node *Node) SetRouter(router api.Router)
- func (node *Node) Start() error
- func (node *Node) Stop()
Constants ¶
This section is empty.
Variables ¶
var OutBufferSize = 128
OutBufferSize - Out() output go channel buffer size
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node : defines an instance of the API with a ql-DB backed Node
func (*Node) AddChannel ¶
AddChannel : Add a channel to this node's database
func (*Node) AddContact ¶
AddContact : Add or Update a contact key to this node's database
func (*Node) AddProfile ¶
AddProfile : Add or Update a profile to this node's database
func (*Node) BootstrapDB ¶
BootstrapDB - Initialize or open a database file
func (*Node) DeleteChannel ¶
DeleteChannel : Remove a channel from this node's database
func (*Node) DeleteContact ¶
DeleteContact : Remove a contact from this node's database
func (*Node) DeletePeer ¶
DeletePeer : Remove a peer from this node's database
func (*Node) DeleteProfile ¶
DeleteProfile : Remove a profile from this node's database
func (*Node) FlushOutbox ¶
FlushOutbox : Deletes outbound messages older than maxAgeSeconds seconds
func (*Node) Forward ¶
Forward - Add an already-encrypted message to the outbound message queue (forward it along)
func (*Node) GetChannel ¶
GetChannel : Return a channel by name
func (*Node) GetChannelPrivKey ¶
GetChannelPrivKey : Return the private key of a given channel
func (*Node) GetChannels ¶
GetChannels : Return list of channels known to this node
func (*Node) GetContact ¶
GetContact : Return a list of keys
func (*Node) GetContacts ¶
GetContacts : Return a list of keys
func (*Node) GetPolicies ¶
GetPolicies : returns the array of Policy objects for this Node
func (*Node) GetProfile ¶
GetProfile : Retrieve a profiles
func (*Node) GetProfiles ¶
GetProfiles : Retrieve the list of profiles for this node
func (*Node) LoadProfile ¶
LoadProfile : Load a profile key from the database as the content key
func (*Node) Pickup ¶
func (node *Node) Pickup(rpub bc.PubKey, lastTime int64, maxBytes int64, channelNames ...string) (api.Bundle, error)
Pickup : Get messages from a remote node
func (*Node) SendChannel ¶
SendChannel : Transmit a message to a channel
func (*Node) SendChannelBulk ¶
SendChannelBulk : Transmit messages to a channel