github.com/psiphon-inc/goarista@v0.0.0-20160825065156-d002785f4c67/README.md (about) 1 # Arista Go library [![Build Status](https://travis-ci.org/aristanetworks/goarista.svg?branch=master)](https://travis-ci.org/aristanetworks/goarista) [![codecov.io](http://codecov.io/github/aristanetworks/goarista/coverage.svg?branch=master)](http://codecov.io/github/aristanetworks/goarista?branch=master) [![GoDoc](https://godoc.org/github.com/aristanetworks/goarista?status.png)](https://godoc.org/github.com/aristanetworks/goarista) [![Go Report Card](https://goreportcard.com/badge/github.com/aristanetworks/goarista)](https://goreportcard.com/report/github.com/aristanetworks/goarista) 2 3 ## areflect 4 5 Helper functions to work with the `reflect` package. Contains 6 `ForceExport()`, which bypasses the check in `reflect.Value` that 7 prevents accessing unexported attributes. 8 9 ## monotime 10 11 Provides access to a fast monotonic clock source, to fill in the gap in the 12 [Go standard library, which lacks one](https://github.com/golang/go/issues/12914). 13 Don't use `time.Now()` in code that needs to time things or otherwise assume 14 that time passes at a constant rate, instead use `monotime.Now()`. 15 16 ## cmd 17 18 See the [cmd](cmd) directory. 19 20 ## dscp 21 22 Provides `ListenTCPWithTOS()`, which is a replacement for `net.ListenTCP()` 23 that allows specifying the ToS (Type of Service), to specify DSCP / ECN / 24 class of service flags to use for incoming connections. 25 26 ## key 27 28 Provides a common type used across various Arista projects, named `key.Key`, 29 which is used to work around the fact that Go can't let one 30 use a non-hashable type as a key to a `map`, and we sometimes need to use 31 a `map[string]interface{}` (or something containing one) as a key to maps. 32 As a result, we frequently use `map[key.Key]interface{}` instead of just 33 `map[interface{}]interface{}` when we need a generic key-value collection. 34 35 ## lanz 36 A client for [LANZ](https://eos.arista.com/latency-analyzer-lanz-architectures-and-configuration/) 37 streaming servers. It connects to a LANZ streaming server, 38 listens for notifications, decodes them and sends the LANZ protobuf on the 39 provided channel. 40 41 ## monitor 42 43 A library to help expose monitoring metrics on top of the 44 [`expvar`](https://golang.org/pkg/expvar/) infrastructure. 45 46 ## netns 47 48 `netns.Do(namespace, cb)` provides a handy mechanism to execute the given 49 callback `cb` in the given [network namespace](https://lwn.net/Articles/580893/). 50 51 ## pathmap 52 53 A datastructure for mapping keys of type string slice to values. It 54 allows for some fuzzy matching. 55 56 ## test 57 58 This is a [Go](http://golang.org/) library to help in writing unit tests. 59 60 ## Examples 61 62 TBD