Documentation
¶
Overview ¶
Package samplestream provides utilities for creating gNMI Subscriptions in SAMPLE mode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SampleStream ¶
type SampleStream[T any] struct { // contains filtered or unexported fields }
SampleStream represents a gNMI Subscription with SAMPLE mode.
func New ¶
func New[T any](t *testing.T, dut *ondatra.DUTDevice, q ygnmi.SingletonQuery[T], interval time.Duration) *SampleStream[T]
New creates a new SampleStream.
func (*SampleStream[T]) All ¶
func (s *SampleStream[T]) All() []*ygnmi.Value[T]
All returns the list of values that has been received thus far.
func (*SampleStream[T]) Close ¶
func (s *SampleStream[T]) Close()
Close closes the gnmi subscription.
func (*SampleStream[T]) Next ¶
func (s *SampleStream[T]) Next() *ygnmi.Value[T]
Next returns the next sample received within the sample interval. If no sample is received within the interval, nil is returned.
Click to show internal directories.
Click to hide internal directories.