exporters

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package exporters provides an interface to export gNMI notifications to other systems or data formats.

Index

Constants

This section is empty.

Variables

View Source
var Registry = make(map[string]func(config *configuration.GatewayConfig) Exporter)

Functions

func Register added in v0.7.0

func Register(name string, new func(config *configuration.GatewayConfig) Exporter)

Types

type Exporter

type Exporter interface {
	// Name must return unique exporter name that will be used for registration
	// and recording internal stats.
	Name() string
	// Start will be called once by the gateway.Gateway after StartGateway
	// is called. It will receive a pointer to the cache.Cache that
	// receives all of the updates from gNMI targets that the gateway has a
	// subscription for. If Start returns an error the gateway will fail to
	// start with an error.
	Start(*cache.Cache) error
	// Export will be called once for every gNMI notification that is inserted
	// into the cache.Cache. Export should complete as quickly as possible to
	// prevent delays in the system and upstream gNMI clients.
	// Export receives the leaf parameter which is a *ctree.Leaf type and
	// has a value of type *gnmipb.Notification. You can access the notification
	// with a type assertion: leaf.Value().(*gnmipb.Notification)
	Export(leaf *ctree.Leaf)
}

Exporter is an interface to send data to other systems and protocols.

func New added in v0.7.0

func New(name string, config *configuration.GatewayConfig) Exporter

Directories

Path Synopsis
Package debug provides an exporter that will log all received gNMI messages for debugging purposes.
Package debug provides an exporter that will log all received gNMI messages for debugging purposes.

Jump to

Keyboard shortcuts

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