Documentation ¶
Index ¶
- type Conn
- func (c *Conn) AddLink(alias string, channel *security.Channel)
- func (c *Conn) CanSubscribe(ssid message.Ssid, channel []byte) bool
- func (c *Conn) CanUnsubscribe(ssid message.Ssid, channel []byte) bool
- func (c *Conn) Close() error
- func (c *Conn) Decrement(ssid message.Ssid) bool
- func (c *Conn) GetLink(topic []byte) []byte
- func (c *Conn) ID() string
- func (c *Conn) Increment(ssid message.Ssid, channel []byte) bool
- func (c *Conn) Links() map[string]string
- func (c *Conn) LocalID() security.ID
- func (c *Conn) MeasureElapsed(name string, since time.Time)
- func (c *Conn) Process() error
- func (c *Conn) Send(m *message.Message) (err error)
- func (c *Conn) Track(contract contract.Contract)
- func (c *Conn) Type() message.SubscriberType
- func (c *Conn) Username() string
- type Service
- func (s *Service) Authorize(channel *security.Channel, permission uint8) (contract.Contract, security.Key, bool)
- func (s *Service) Close()
- func (s *Service) ID() uint64
- func (s *Service) Join(peers ...string) []error
- func (s *Service) Listen() (err error)
- func (s *Service) NotifySubscribe(sub message.Subscriber, ev *event.Subscription)
- func (s *Service) NotifyUnsubscribe(sub message.Subscriber, ev *event.Subscription)
- func (s *Service) NumPeers() int
- func (s *Service) Query(query string, payload []byte) (message.Awaiter, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
Conn represents an incoming connection.
func (*Conn) CanSubscribe ¶
CanSubscribe increments the internal counters and checks if the cluster needs to be notified.
func (*Conn) CanUnsubscribe ¶
CanUnsubscribe decrements the internal counters and checks if the cluster needs to be notified.
func (*Conn) MeasureElapsed ¶
MeasureElapsed measures elapsed time since
func (*Conn) Type ¶
func (c *Conn) Type() message.SubscriberType
Type returns the type of the subscriber
type Service ¶
type Service struct { License license.License // The licence for this emitter server. Config *config.Config // The configuration for the service. // contains filtered or unexported fields }
Service represents the main structure.
func NewService ¶
NewService creates a new service.
func (*Service) Authorize ¶
func (s *Service) Authorize(channel *security.Channel, permission uint8) (contract.Contract, security.Key, bool)
Authorize attempts to authorize a channel with its key
func (*Service) NotifySubscribe ¶
func (s *Service) NotifySubscribe(sub message.Subscriber, ev *event.Subscription)
NotifySubscribe notifies the swarm when a subscription occurs.
func (*Service) NotifyUnsubscribe ¶
func (s *Service) NotifyUnsubscribe(sub message.Subscriber, ev *event.Subscription)
NotifyUnsubscribe notifies the swarm when an unsubscription occurs.
Click to show internal directories.
Click to hide internal directories.