Help us shape the future of Go! Take the 2026 Go Developer Survey

gnmiserver

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package gnmiserver implements the collector's northbound gNMI server.

It exposes the same gNMI interface as the `subscribe` command's gNMI server (see pkg/app/gnmi_server.go):

  • Subscribe and Get RPCs are served from the collector cache, which is kept in sync with the configured targets/subscriptions by the outputs manager.
  • Set RPCs are relayed to the target(s) selected via the request Prefix.Target field (disabled by default, see `read-only`).
  • Get requests with origin `gnmic` are served from the collector's configuration store (`targets` and `subscriptions` paths).

It is configured with the same `gnmi-server` config section used by the `subscribe` command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is the collector's northbound gNMI server.

func NewServer

NewServer creates a new collector gNMI server. The server is only effectively started (listening) if the `gnmi-server` section is present in the configuration store when Start is called.

func (*Server) Start

func (s *Server) Start(c cache.Cache, wg *sync.WaitGroup) error

Start reads the `gnmi-server` configuration from the store and, if present, starts the gNMI server. `c` is the cache the Subscribe RPCs are served from; it is populated by the outputs manager.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the gNMI server.

Jump to

Keyboard shortcuts

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