Documentation ¶
Index ¶
- type Dispatcher
- func (b *Dispatcher) AddSubscriber(streamRequestor gnmi.GNMI_SubscribeServer) *Subscriber
- func (b *Dispatcher) Broadcast(msg *gnmi.Notification, topics []string)
- func (b *Dispatcher) GetSubscribers(topic string) int
- func (b *Dispatcher) Publish(stringPath string, msg *gnmi.Notification)
- func (b *Dispatcher) RemoveSubscriber(s *Subscriber)
- func (b *Dispatcher) Subscribe(s *Subscriber, topic string)
- func (b *Dispatcher) Unsubscribe(s *Subscriber, topic string)
- type InfoChangeMessage
- type Subscriber
- func (s *Subscriber) AddTopic(topic string)
- func (s *Subscriber) Destruct()
- func (s *Subscriber) GetTopics() []string
- func (s *Subscriber) GetstreamRequestor() gnmi.GNMI_SubscribeServer
- func (s *Subscriber) Listen()
- func (s *Subscriber) RemoveTopic(topic string)
- func (s *Subscriber) ReturnListenChannel() (pubChannel chan *InfoChangeMessage)
- func (s *Subscriber) Signal(msg *InfoChangeMessage)
- type Subscribers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func NewDispatcher ¶
func NewDispatcher() *Dispatcher
func (*Dispatcher) AddSubscriber ¶
func (b *Dispatcher) AddSubscriber(streamRequestor gnmi.GNMI_SubscribeServer) *Subscriber
func (*Dispatcher) Broadcast ¶
func (b *Dispatcher) Broadcast(msg *gnmi.Notification, topics []string)
func (*Dispatcher) GetSubscribers ¶
func (b *Dispatcher) GetSubscribers(topic string) int
func (*Dispatcher) Publish ¶
func (b *Dispatcher) Publish(stringPath string, msg *gnmi.Notification)
Publish the message for given topic
func (*Dispatcher) RemoveSubscriber ¶
func (b *Dispatcher) RemoveSubscriber(s *Subscriber)
func (*Dispatcher) Subscribe ¶
func (b *Dispatcher) Subscribe(s *Subscriber, topic string)
func (*Dispatcher) Unsubscribe ¶
func (b *Dispatcher) Unsubscribe(s *Subscriber, topic string)
type InfoChangeMessage ¶
type InfoChangeMessage struct {
// contains filtered or unexported fields
}
func NewInfoChangeMessage ¶
func NewInfoChangeMessage(msg *gnmi.Notification, yangPath string) *InfoChangeMessage
func (*InfoChangeMessage) GetMessageBody ¶
func (m *InfoChangeMessage) GetMessageBody() *gnmi.Notification
func (*InfoChangeMessage) GetYangPath ¶
func (m *InfoChangeMessage) GetYangPath() string
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
func CreateNewSubscriber ¶
func CreateNewSubscriber(streamRequestor gnmi.GNMI_SubscribeServer) (string, *Subscriber)
func (*Subscriber) AddTopic ¶
func (s *Subscriber) AddTopic(topic string)
func (*Subscriber) Destruct ¶
func (s *Subscriber) Destruct()
func (*Subscriber) GetTopics ¶
func (s *Subscriber) GetTopics() []string
func (*Subscriber) GetstreamRequestor ¶
func (s *Subscriber) GetstreamRequestor() gnmi.GNMI_SubscribeServer
func (*Subscriber) Listen ¶
func (s *Subscriber) Listen()
func (*Subscriber) RemoveTopic ¶
func (s *Subscriber) RemoveTopic(topic string)
func (*Subscriber) ReturnListenChannel ¶
func (s *Subscriber) ReturnListenChannel() (pubChannel chan *InfoChangeMessage)
func (*Subscriber) Signal ¶
func (s *Subscriber) Signal(msg *InfoChangeMessage)
type Subscribers ¶
type Subscribers map[string]*Subscriber
Click to show internal directories.
Click to hide internal directories.