Documentation ¶
Overview ¶
Package fakegnmi implements a fake GNMI server with the ability to stub responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeGNMI ¶
type FakeGNMI struct {
// contains filtered or unexported fields
}
FakeGNMI is a running fake GNMI server.
func (*FakeGNMI) Dial ¶
func (g *FakeGNMI) Dial(ctx context.Context, opts ...grpc.DialOption) (gpb.GNMIClient, error)
Dial dials the fake gNMI client and returns a gNMI client stub.
func (*FakeGNMI) GetRequests ¶
func (g *FakeGNMI) GetRequests() []*gpb.GetRequest
GetRequests returns the set of GetRequests sent to the gNMI server.
func (*FakeGNMI) Requests ¶
func (g *FakeGNMI) Requests() []*gpb.SubscribeRequest
Requests returns the set of SubscribeRequests sent to the gNMI server.
type Stubber ¶
type Stubber struct {
// contains filtered or unexported fields
}
Stubber is a handle to add stubbed responses.
func (*Stubber) GetResponse ¶
func (s *Stubber) GetResponse(gr *gpb.GetResponse) *Stubber
GetResponse appends the given GetResponse as a stub response.
func (*Stubber) Notification ¶
func (s *Stubber) Notification(n *gpb.Notification) *Stubber
Notification appends the given notification as a stub response.
Click to show internal directories.
Click to hide internal directories.