notifications

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL