goarista

module
v0.0.0-...-cc18b67 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0

README

Arista Go library Build Status codecov.io GoDoc Go Report Card

areflect

Helper functions to work with the reflect package. Contains ForceExport(), which bypasses the check in reflect.Value that prevents accessing unexported attributes.

monotime

Provides access to a fast monotonic clock source, to fill in the gap in the Go standard library, which lacks one. Don't use time.Now() in code that needs to time things or otherwise assume that time passes at a constant rate, instead use monotime.Now().

cmd

See the cmd directory.

dscp

Provides ListenTCPWithTOS(), which is a replacement for net.ListenTCP() that allows specifying the ToS (Type of Service), to specify DSCP / ECN / class of service flags to use for incoming connections. Requires go1.9.

key

Provides common types used across various Arista projects. The type key.Key is used to work around the fact that Go can't let one use a non-hashable type as a key to a map. Because we often use a map[string]interface{} (or other non-hashable type) as a key to a map, the type key.Map is used to represent a map that can store both natively hashable and non-hashable types alike. To do this, a non-hashable type must have a custom Hash() method defined. The type key.Path is the representation of a path broken down into individual elements, where each element is a key.Key. The type key.Pointer represents a pointer to a key.Path.

path

Provides functions that can be used to manipulate key.Path objects. The type path.Map may be used for mapping paths to values. It allows for some fuzzy matching for paths containing path.Wildcard keys.

lanz

A client for LANZ streaming servers. It connects to a LANZ streaming server, listens for notifications, decodes them and sends the LANZ protobuf on the provided channel.

monitor

A library to help expose monitoring metrics on top of the expvar infrastructure.

netns

netns.Do(namespace, cb) provides a handy mechanism to execute the given callback cb in the given network namespace.

influxlib

This is a influxdb library that provides easy methods of connecting to, writing to, and reading from the service.

test

This is a Go library to help in writing unit tests.

Examples

TBD

Directories

Path Synopsis
Package areflect provides utilities to help with reflection.
Package areflect provides utilities to help with reflection.
cmd
json2test
json2test reformats 'go test -json' output as text as if the -json flag were not passed to go test.
json2test reformats 'go test -json' output as text as if the -json flag were not passed to go test.
ockafka
The occlient tool is a client for the gRPC service for getting and setting the OpenConfig configuration and state of a network device.
The occlient tool is a client for the gRPC service for getting and setting the OpenConfig configuration and state of a network device.
ocprometheus
The ocprometheus implements a Prometheus exporter for OpenConfig telemetry data.
The ocprometheus implements a Prometheus exporter for OpenConfig telemetry data.
ocredis
The ocredis tool is a client for the OpenConfig gRPC interface that subscribes to state and pushes it to Redis, using Redis' support for hash maps and for publishing events that can be subscribed to.
The ocredis tool is a client for the OpenConfig gRPC interface that subscribes to state and pushes it to Redis, using Redis' support for hash maps and for publishing events that can be subscribed to.
octsdb
The octsdb tool pushes OpenConfig telemetry to OpenTSDB.
The octsdb tool pushes OpenConfig telemetry to OpenTSDB.
test2influxdb
test2influxdb writes results from 'go test -json' to an influxdb database.
test2influxdb writes results from 'go test -json' to an influxdb database.
Package dscp provides helper functions to apply DSCP / ECN / CoS flags to sockets.
Package dscp provides helper functions to apply DSCP / ECN / CoS flags to sockets.
Package lanz implements a LANZ client that will listen to notofications from LANZ streaming server and will decode them and send them as a protobuf over a channel to a receiver.
Package lanz implements a LANZ client that will listen to notofications from LANZ streaming server and will decode them and send them as a protobuf over a channel to a receiver.
Package monitor provides an embedded HTTP server to expose metrics for monitoring
Package monitor provides an embedded HTTP server to expose metrics for monitoring
Package monotime provides a fast monotonic clock source.
Package monotime provides a fast monotonic clock source.
Package netns provides a utility function that allows a user to perform actions in a different network namespace
Package netns provides a utility function that allows a user to perform actions in a different network namespace
client
Package client provides helper functions for OpenConfig CLI tools.
Package client provides helper functions for OpenConfig CLI tools.
Package path contains methods for dealing with key.Paths.
Package path contains methods for dealing with key.Paths.
Package value defines an interface for user-defined types with value semantics to implement in order to be compatible with the rest of the Arista Go infrastructure.
Package value defines an interface for user-defined types with value semantics to implement in order to be compatible with the rest of the Arista Go infrastructure.

Jump to

Keyboard shortcuts

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