gnmi

package
v1.40.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 24 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParsePath

func ParsePath(origin, pathToParse, target string) (*gnmi.Path, error)

ParsePath from XPath-like string to gNMI path structure

Types

type Handler

type Handler struct {
	*HandlerConfig
	// contains filtered or unexported fields
}

func (*Handler) AddAlias

func (h *Handler) AddAlias(name, path string)

func (*Handler) AddAliasFromSubscription

func (h *Handler) AddAliasFromSubscription(s Subscription) error

func (*Handler) AddTagSubscription

func (h *Handler) AddTagSubscription(s *TagSubscription)

func (*Handler) Process

func (h *Handler) Process(acc telegraf.Accumulator, source string, response *gnmi.SubscribeResponse)

type HandlerConfig

type HandlerConfig struct {
	EmitDeleteMetrics   bool     `toml:"emit_delete_metrics"`
	CanonicalFieldNames bool     `toml:"canonical_field_names"`
	TrimSlash           bool     `toml:"trim_field_names"`
	TagPathPrefix       bool     `toml:"prefix_tag_key_with_path"`
	GuessPathStrategy   string   `toml:"path_guessing_strategy"`
	VendorExt           []string `toml:"vendor_specific"`
	YangModelPaths      []string `toml:"yang_model_paths"`
}

func (*HandlerConfig) Handler

func (cfg *HandlerConfig) Handler(log telegraf.Logger, options ...Option) (*Handler, error)

type Option

type Option func(*Handler)

func WithDefaultName

func WithDefaultName(name string) Option

func WithEnforceFirstNamespaceAsOrigin

func WithEnforceFirstNamespaceAsOrigin() Option

type Subscription

type Subscription struct {
	Name              string          `toml:"name"`
	Origin            string          `toml:"origin"`
	Path              string          `toml:"path"`
	SubscriptionMode  string          `toml:"subscription_mode"`
	SampleInterval    config.Duration `toml:"sample_interval"`
	SuppressRedundant bool            `toml:"suppress_redundant"`
	HeartbeatInterval config.Duration `toml:"heartbeat_interval"`
	// contains filtered or unexported fields
}

func (*Subscription) Build

func (s *Subscription) Build(origin, prefix, target string) error

func (*Subscription) Request

func (s *Subscription) Request() (*gnmi.Subscription, error)

type TagSubscription

type TagSubscription struct {
	Match    string   `toml:"match"`
	Elements []string `toml:"elements"`
	Subscription
}

Directories

Path Synopsis
extensions

Jump to

Keyboard shortcuts

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