gnmihelper

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGnmiServer

func NewGnmiServer(ctx context.Context, s pb.GNMIServer, opts ...grpc.DialOption) (*grpc.Server, *grpc.ClientConn)

func NewGnmiServerWithListener

func NewGnmiServerWithListener(s pb.GNMIServer, lis net.Listener) *grpc.Server

Types

type GnmiMock

type GnmiMock struct {
	pb.UnimplementedGNMIServer
	CapabilitiesHandler func(context.Context, *pb.CapabilityRequest) (*pb.CapabilityResponse, error)
	GetHandler          func(context.Context, *pb.GetRequest) (*pb.GetResponse, error)
	SetHandler          func(context.Context, *pb.SetRequest) (*pb.SetResponse, error)
	SubscribeHandler    func(pb.GNMI_SubscribeServer) error
}

func (*GnmiMock) Capabilities

func (s *GnmiMock) Capabilities(ctx context.Context, r *pb.CapabilityRequest) (*pb.CapabilityResponse, error)

func (*GnmiMock) Get

func (s *GnmiMock) Get(ctx context.Context, r *pb.GetRequest) (*pb.GetResponse, error)

func (*GnmiMock) Set

func (s *GnmiMock) Set(ctx context.Context, r *pb.SetRequest) (*pb.SetResponse, error)

func (*GnmiMock) Subscribe

func (s *GnmiMock) Subscribe(stream pb.GNMI_SubscribeServer) error

Jump to

Keyboard shortcuts

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