Documentation ¶
Index ¶
- type MemDiscovery
- func (o *MemDiscovery) GatewayGet(gatekey string) qtiny.Gateway
- func (o *MemDiscovery) GatewayPublish(gatekey string, gateway qtiny.Gateway) error
- func (o *MemDiscovery) GatewayUnpublish(gatekey string) error
- func (o *MemDiscovery) GetLogger() *log.Logger
- func (o *MemDiscovery) GetNodeId() string
- func (o *MemDiscovery) GetTag() string
- func (o *MemDiscovery) NanoLocalAdd(nano *qtiny.Nano)
- func (o *MemDiscovery) NanoLocalAll() map[string]*qtiny.Nano
- func (o *MemDiscovery) NanoLocalGet(address string) (*qtiny.Nano, error)
- func (o *MemDiscovery) NanoLocalRegister(nano *qtiny.Nano) error
- func (o *MemDiscovery) NanoLocalRemove(address string)
- func (o *MemDiscovery) NanoLocalUnregister(nano *qtiny.Nano) error
- func (o *MemDiscovery) NanoRemoteGet(address string) (*qtiny.Nano, error)
- func (o *MemDiscovery) NanoRemoteRegister(nano *qtiny.Nano) error
- func (o *MemDiscovery) NanoRemoteUnregister(nano *qtiny.Nano) error
- func (o *MemDiscovery) PortalCreate(addresss string) *qtiny.Portal
- func (o *MemDiscovery) PortalGet(address string) qtiny.PortalKind
- func (o *MemDiscovery) PortalRemove(address string)
- func (o *MemDiscovery) PortalSet(portal *qtiny.Portal)
- func (o *MemDiscovery) SetLogger(logger *log.Logger)
- func (o *MemDiscovery) SetNodeId(id string)
- func (o *MemDiscovery) Start(config map[string]interface{}) error
- func (o *MemDiscovery) Stop(map[string]interface{}) error
- type MemGateway
- func (o *MemGateway) Broadcast(message *qtiny.Message, discovery qtiny.Discovery) error
- func (o *MemGateway) DispatchLoop()
- func (o *MemGateway) EventChannelClose(channelId string) error
- func (o *MemGateway) EventChannelGet(channelId string) (<-chan *qtiny.GatewayEventBox, error)
- func (o *MemGateway) EventChannelSend(event qtiny.GatewayEvent, meta map[string]interface{})
- func (o *MemGateway) GetConfig() map[string]interface{}
- func (o *MemGateway) GetId() string
- func (o *MemGateway) GetIdHash() uint32
- func (o *MemGateway) GetLogger() *log.Logger
- func (o *MemGateway) GetMeta() map[string]interface{}
- func (o *MemGateway) GetNodeId() string
- func (o *MemGateway) GetNodeIdHash() uint32
- func (o *MemGateway) GetTag() string
- func (o *MemGateway) GetType() string
- func (o *MemGateway) GetTypeHash() uint32
- func (o *MemGateway) IsPortalValid(portal qtiny.PortalKind) bool
- func (o *MemGateway) Multicast(message *qtiny.Message, discovery qtiny.Discovery) error
- func (o *MemGateway) Poll(limit int) (chan *qtiny.Message, error)
- func (o *MemGateway) Post(message *qtiny.Message, discovery qtiny.Discovery) error
- func (o *MemGateway) Publish(message *qtiny.Message, discovery qtiny.Discovery) (err error)
- func (o *MemGateway) SetConfig(config map[string]interface{})
- func (o *MemGateway) SetId(id string)
- func (o *MemGateway) SetLogger(logger *log.Logger)
- func (o *MemGateway) SetNodeId(nodeId string)
- func (o *MemGateway) Start(config map[string]interface{}) error
- func (o *MemGateway) Stop(map[string]interface{}) error
- type PublishHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemDiscovery ¶
type MemDiscovery struct { Mutex sync.Mutex Looping bool Logger *log.Logger Listeners []chan *qtiny.Message // local nanos LocalsMutex sync.RWMutex Locals map[string]*qtiny.Nano // remote nanos RemotesMutex sync.RWMutex Remotes map[string]*qtiny.Nano // local gateway GatewaysMutex sync.RWMutex Gateways map[string]qtiny.Gateway // remote portal PortalsMutex sync.RWMutex Portals map[string]*qtiny.Portal LocalAsRemote bool // contains filtered or unexported fields }
func (*MemDiscovery) GatewayGet ¶
func (o *MemDiscovery) GatewayGet(gatekey string) qtiny.Gateway
func (*MemDiscovery) GatewayPublish ¶
func (o *MemDiscovery) GatewayPublish(gatekey string, gateway qtiny.Gateway) error
func (*MemDiscovery) GatewayUnpublish ¶
func (o *MemDiscovery) GatewayUnpublish(gatekey string) error
func (*MemDiscovery) GetLogger ¶
func (o *MemDiscovery) GetLogger() *log.Logger
func (*MemDiscovery) GetNodeId ¶
func (o *MemDiscovery) GetNodeId() string
func (*MemDiscovery) GetTag ¶
func (o *MemDiscovery) GetTag() string
func (*MemDiscovery) NanoLocalAdd ¶
func (o *MemDiscovery) NanoLocalAdd(nano *qtiny.Nano)
func (*MemDiscovery) NanoLocalAll ¶
func (o *MemDiscovery) NanoLocalAll() map[string]*qtiny.Nano
func (*MemDiscovery) NanoLocalGet ¶
func (o *MemDiscovery) NanoLocalGet(address string) (*qtiny.Nano, error)
func (*MemDiscovery) NanoLocalRegister ¶
func (o *MemDiscovery) NanoLocalRegister(nano *qtiny.Nano) error
func (*MemDiscovery) NanoLocalRemove ¶
func (o *MemDiscovery) NanoLocalRemove(address string)
func (*MemDiscovery) NanoLocalUnregister ¶
func (o *MemDiscovery) NanoLocalUnregister(nano *qtiny.Nano) error
func (*MemDiscovery) NanoRemoteGet ¶
func (o *MemDiscovery) NanoRemoteGet(address string) (*qtiny.Nano, error)
func (*MemDiscovery) NanoRemoteRegister ¶
func (o *MemDiscovery) NanoRemoteRegister(nano *qtiny.Nano) error
func (*MemDiscovery) NanoRemoteUnregister ¶
func (o *MemDiscovery) NanoRemoteUnregister(nano *qtiny.Nano) error
func (*MemDiscovery) PortalCreate ¶
func (o *MemDiscovery) PortalCreate(addresss string) *qtiny.Portal
func (*MemDiscovery) PortalGet ¶
func (o *MemDiscovery) PortalGet(address string) qtiny.PortalKind
func (*MemDiscovery) PortalRemove ¶
func (o *MemDiscovery) PortalRemove(address string)
func (*MemDiscovery) PortalSet ¶
func (o *MemDiscovery) PortalSet(portal *qtiny.Portal)
func (*MemDiscovery) SetLogger ¶
func (o *MemDiscovery) SetLogger(logger *log.Logger)
func (*MemDiscovery) SetNodeId ¶
func (o *MemDiscovery) SetNodeId(id string)
func (*MemDiscovery) Start ¶
func (o *MemDiscovery) Start(config map[string]interface{}) error
func (*MemDiscovery) Stop ¶
func (o *MemDiscovery) Stop(map[string]interface{}) error
type MemGateway ¶
type MemGateway struct { Id string IdHash uint32 NodeId string NodeIdHash uint32 Type string TypeHash uint32 Tag string Mutex sync.Mutex Looping bool Logger *log.Logger QueueLimit int Queue chan *qtiny.Message Listeners []chan *qtiny.Message Meta map[string]interface{} Config map[string]interface{} EventChannelsMutex sync.RWMutex EventChannels map[string]chan *qtiny.GatewayEventBox Publisher PublishHandler Verbose int }
func (*MemGateway) DispatchLoop ¶
func (o *MemGateway) DispatchLoop()
func (*MemGateway) EventChannelClose ¶
func (o *MemGateway) EventChannelClose(channelId string) error
func (*MemGateway) EventChannelGet ¶
func (o *MemGateway) EventChannelGet(channelId string) (<-chan *qtiny.GatewayEventBox, error)
func (*MemGateway) EventChannelSend ¶
func (o *MemGateway) EventChannelSend(event qtiny.GatewayEvent, meta map[string]interface{})
func (*MemGateway) GetConfig ¶
func (o *MemGateway) GetConfig() map[string]interface{}
func (*MemGateway) GetId ¶
func (o *MemGateway) GetId() string
func (*MemGateway) GetIdHash ¶
func (o *MemGateway) GetIdHash() uint32
func (*MemGateway) GetLogger ¶
func (o *MemGateway) GetLogger() *log.Logger
func (*MemGateway) GetMeta ¶
func (o *MemGateway) GetMeta() map[string]interface{}
func (*MemGateway) GetNodeId ¶
func (o *MemGateway) GetNodeId() string
func (*MemGateway) GetNodeIdHash ¶
func (o *MemGateway) GetNodeIdHash() uint32
func (*MemGateway) GetTag ¶
func (o *MemGateway) GetTag() string
func (*MemGateway) GetType ¶
func (o *MemGateway) GetType() string
func (*MemGateway) GetTypeHash ¶
func (o *MemGateway) GetTypeHash() uint32
func (*MemGateway) IsPortalValid ¶
func (o *MemGateway) IsPortalValid(portal qtiny.PortalKind) bool
func (*MemGateway) SetConfig ¶
func (o *MemGateway) SetConfig(config map[string]interface{})
func (*MemGateway) SetId ¶
func (o *MemGateway) SetId(id string)
func (*MemGateway) SetLogger ¶
func (o *MemGateway) SetLogger(logger *log.Logger)
func (*MemGateway) SetNodeId ¶
func (o *MemGateway) SetNodeId(nodeId string)
func (*MemGateway) Start ¶
func (o *MemGateway) Start(config map[string]interface{}) error
func (*MemGateway) Stop ¶
func (o *MemGateway) Stop(map[string]interface{}) error
Click to show internal directories.
Click to hide internal directories.