gitlab.com/aquachain/aquachain@v1.17.16-rc3.0.20221018032414-e3ddf1e1c055/common/mclock/internal/monotime/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. Requires `go1.9`. 25 26 ## key 27 28 Provides common types used across various Arista projects. The type `key.Key` 29 is used to work around the fact that Go can't let one use a non-hashable type 30 as a key to a `map`, and we sometimes need to use a `map[string]interface{}` 31 (or something containing one) as a key to maps. As a result, we frequently use 32 `map[key.Key]interface{}` instead of just `map[interface{}]interface{}` when we 33 need a generic key-value collection. The type `key.Path` is the representation 34 of a path broken down into individual elements, where each element is a `key.Key`. 35 The type `key.Pointer` represents a pointer to a `key.Path`. 36 37 ## path 38 39 Provides functions that can be used to manipulate `key.Path` objects. The type 40 `path.Map` may be used for mapping paths to values. It allows for some fuzzy 41 matching for paths containing `path.Wildcard` keys. 42 43 ## lanz 44 A client for [LANZ](https://eos.arista.com/latency-analyzer-lanz-architectures-and-configuration/) 45 streaming servers. It connects to a LANZ streaming server, 46 listens for notifications, decodes them and sends the LANZ protobuf on the 47 provided channel. 48 49 ## monitor 50 51 A library to help expose monitoring metrics on top of the 52 [`expvar`](https://golang.org/pkg/expvar/) infrastructure. 53 54 ## netns 55 56 `netns.Do(namespace, cb)` provides a handy mechanism to execute the given 57 callback `cb` in the given [network namespace](https://lwn.net/Articles/580893/). 58 59 ## influxlib 60 61 This is a influxdb library that provides easy methods of connecting to, writing to, 62 and reading from the service. 63 64 ## test 65 66 This is a [Go](http://golang.org/) library to help in writing unit tests. 67 68 ## Examples 69 70 TBD