Documentation ¶
Overview ¶
Package gnmi implements a gnmi server to mock a device with YANG models.
Package gnmi implements a gnmi server to mock a device with YANG models.
Package gnmi implements a gnmi server to mock a device with YANG models.
Package gnmi implements a gnmi server to mock a device with YANG models.
Package agent implements a gnmi server ¶
Package gnmi implements a gnmi server to mock a device with YANG models.
Index ¶
- type GnmiService
- type Server
- func (s *Server) Capabilities(ctx context.Context, req *pb.CapabilityRequest) (*pb.CapabilityResponse, error)
- func (s *Server) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)
- func (s *Server) Set(ctx context.Context, req *pb.SetRequest) (*pb.SetResponse, error)
- func (s *Server) Subscribe(stream pb.GNMI_SubscribeServer) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GnmiService ¶
type GnmiService interface { northbound.Service }
func NewService ¶
func NewService(configurable configurable.Configurable) GnmiService
NewService creates a new gnmi service
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the interface of gnmi server. It supports Capabilities, Get, and Set APIs.
func (*Server) Capabilities ¶
func (s *Server) Capabilities(ctx context.Context, req *pb.CapabilityRequest) (*pb.CapabilityResponse, error)
Capabilities returns supported encodings and supported models.
func (*Server) Get ¶
func (s *Server) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)
Get implements the Get RPC in gNMI spec.
func (*Server) Set ¶
func (s *Server) Set(ctx context.Context, req *pb.SetRequest) (*pb.SetResponse, error)
Set implements the Set RPC in gNMI spec.