Documentation ¶
Index ¶
- Constants
- Variables
- type ApplicationCallback
- type ApplicationContainer
- func (sas *ApplicationContainer) GetDHT() *dht.IpfsDHT
- func (sas *ApplicationContainer) GetHost() host.Host
- func (sas *ApplicationContainer) GetName() string
- func (sas *ApplicationContainer) GetProtocol() proto.ID
- func (sas *ApplicationContainer) GetPubSub() *floodsub.PubSub
- func (sas *ApplicationContainer) GetVersion() uint
- func (sas *ApplicationContainer) SetAppMeta(app ApplicationCallback, h *host.Host, d *dht.IpfsDHT, p *floodsub.PubSub)
- func (sas *ApplicationContainer) SetNameVersion(name string, ver uint)
- func (sas *ApplicationContainer) SetPriority(p int)
- type ApplicationLinker
- type Service
- type ServiceData
Constants ¶
View Source
const ( PRIORITY_LOW = iota PRIORITY_MEDIUM PRIORITY_HIGH )
defines different levels of priority for services
Variables ¶
View Source
var ( ERR_PERMISSION_DENIED = errors.New("permission denied") ERR_DEFAULT = errors.New("default error") )
Functions ¶
This section is empty.
Types ¶
type ApplicationCallback ¶
type ApplicationCallback func(string) ServiceData
type ApplicationContainer ¶
type ApplicationContainer struct { GetService ApplicationCallback Priority int // higher the better // contains filtered or unexported fields }
func (*ApplicationContainer) GetDHT ¶
func (sas *ApplicationContainer) GetDHT() *dht.IpfsDHT
func (*ApplicationContainer) GetHost ¶
func (sas *ApplicationContainer) GetHost() host.Host
func (*ApplicationContainer) GetName ¶
func (sas *ApplicationContainer) GetName() string
func (*ApplicationContainer) GetProtocol ¶
func (sas *ApplicationContainer) GetProtocol() proto.ID
func (*ApplicationContainer) GetPubSub ¶
func (sas *ApplicationContainer) GetPubSub() *floodsub.PubSub
func (*ApplicationContainer) GetVersion ¶
func (sas *ApplicationContainer) GetVersion() uint
func (*ApplicationContainer) SetAppMeta ¶
func (sas *ApplicationContainer) SetAppMeta(app ApplicationCallback, h *host.Host, d *dht.IpfsDHT, p *floodsub.PubSub)
func (*ApplicationContainer) SetNameVersion ¶
func (sas *ApplicationContainer) SetNameVersion(name string, ver uint)
func (*ApplicationContainer) SetPriority ¶
func (sas *ApplicationContainer) SetPriority(p int)
type ApplicationLinker ¶
type ApplicationLinker interface {
SetAppMeta(ApplicationCallback, *host.Host, *dht.IpfsDHT, *floodsub.PubSub)
}
ApplicationLinker is implemented in struct
Click to show internal directories.
Click to hide internal directories.