Documentation
¶
Index ¶
- Constants
- Variables
- func Manage(s *Service) node.Node
- type EstablishRequest
- type Filter
- type ModifyRequest
- type Receiver
- type ReceiverEvent
- type RecvState
- type Service
- func (s *Service) AddFilter(f Filter)
- func (s *Service) AddStream(stream Stream)
- func (s *Service) DeleteSubsccription(subId string) error
- func (s *Service) EstablishSubscription(req EstablishRequest) (*Subscription, error)
- func (s *Service) KillSubscription(subId string) error
- func (s *Service) ModifySubscription(req ModifyRequest) error
- type Stream
- type SubEvent
- type SubEventType
- type SubState
- type Subscription
- type SubscriptionOptions
Constants ¶
View Source
const ( RecvStateDisconnected = iota RecvStateActive RecvStateSuspended RecvStateConnecting )
View Source
const ( SubStateValid = iota SubStateInvalid SubStateConcluded )
Variables ¶
View Source
var ErrBufferOverflow = errors.New("event buffer full")
Functions ¶
Types ¶
type EstablishRequest ¶
type ModifyRequest ¶
type Receiver ¶
type Receiver func(e ReceiverEvent) error
type ReceiverEvent ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService() *Service
func (*Service) DeleteSubsccription ¶
func (*Service) EstablishSubscription ¶
func (s *Service) EstablishSubscription(req EstablishRequest) (*Subscription, error)
func (*Service) KillSubscription ¶
func (*Service) ModifySubscription ¶
func (s *Service) ModifySubscription(req ModifyRequest) error
type SubEvent ¶
type SubEvent struct { EventId SubEventType Subscription *Subscription Reason string }
type SubEventType ¶
type SubEventType int
const ( SubEventSuspended SubEventType = iota SubEventTerminated SubEventCompleted SubEventModified SubEventResumed SubEventStarted )
type Subscription ¶
type Subscription struct { Id string ConfiguredSubscriptionState SubState Recievers map[string]*receiverEntry // contains filtered or unexported fields }
func NewSubscription ¶
func NewSubscription(id string, service subService) *Subscription
func (*Subscription) AddReceiver ¶
func (s *Subscription) AddReceiver(name string, receiver Receiver) error
func (*Subscription) Apply ¶
func (s *Subscription) Apply(opts SubscriptionOptions) error
func (*Subscription) Options ¶
func (s *Subscription) Options() SubscriptionOptions
func (*Subscription) RemoveReceiver ¶
func (s *Subscription) RemoveReceiver(name string) error
Click to show internal directories.
Click to hide internal directories.