package
0.1.1
Repository: https://github.com/nleiva/telemetry-proto.git
Documentation: pkg.go.dev

# README

Streaming Telemetry

Go Proto Library for Cisco IOS-XR Model Driven Telemetry


The content in proto_go directory is automatically generated and only committed to the repo for convenience.

Should it be necessary to regenerate a golang binding, simply run prep_golang.py from the telemetry_proto root. This script will build the golang proto bindings based on content in the staging directory, generate code and tests, and run the tests, including performance benchmarks.

In some more detail, prep_golang.py takes care of setting up docs.go with go generate directives to generate golang bindings from .proto files, running go generate to generate the golang bindings for the .proto files, as well as generating the wrapper code to serve objects to unmarshal into against the encoding path. Once the wrapper code is generated, it is built, and auto generated tests are run.

Package documentation for golang can be browsed by firing up "godoc -http=:6060 &" picking which every port is covenient, and then point browser to "http://:6060/pkg/telemetry_proto/proto_go/".

A sample run looks like this:


[gows/src/telemetry_proto]$./prep_golang.py
Generating proto_go/mdt_telemetry.go...
Generating proto_go/mdt_telemetry_test.go...
Copying proto_go/doc.go...
Soft links to protos and adding 'go generate' directive in doc.go...
Generating golang bindings for 668 .proto files. This stage takes some time...
Building and running tests for package. The build stage also takes some time...

...
    --- PASS: TestYang2Proto/Cisco-IOS-XR-mpls-ldp-oper:mpls-ldp/global/active/default-vrf/afs/af/discovery/summary (0.00s)
    --- PASS: TestYang2Proto/Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/bmp/server-summaries/server-summary (0.00s)
    --- PASS: TestYang2Proto/Cisco-IOS-XR-mpls-ldp-oper:mpls-ldp/nodes/node/vrfs/vrf/afs/af/forwarding-summary (0.00s)
    --- PASS: TestYang2Proto/Cisco-IOS-XR-infra-tc-oper:traffic-collector/summary (0.00s)
    --- PASS: TestYang2Proto/Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-active/default-vrf/afs/af/advertised-paths/advertised-path (0.00s)
    --- PASS: TestYang2Proto/Cisco-IOS-XR-ipv4-bgp-oper:bgp/instances/instance/instance-standby/vrfs/vrf/update-inbound-error-vrf (0.00s)
=== RUN   ExampleEncodingPathToMessageReflectionSet
--- PASS: ExampleEncodingPathToMessageReflectionSet (0.00s)
=== RUN   ExampleProtoMsgs_MessageReflection
--- PASS: ExampleProtoMsgs_MessageReflection (0.00s)
BenchmarkMessageSetLookup-80            20000000               101 ns/op
PASS
ok      telemetry_proto/proto_go        8.139s
Done.

Dependencies

In order to build the golang bigmuddy-network-telemetry-proto package, go1.8 and protoc are required.

Note that given we are building a package, we do not vendor dependencies. The only dependency is protobuf.

go get -u github.com/golang/protobuf/{proto,protoc-gen-go}
./prep_golang.py

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

EncodingPathsSupported provides a list of gather path ProtoKeys supported by package (for reporting purposes).
EncodingPathToMessageReflectionSet returns an opaque structure tracking relect.Type for Messages pertaining to the ProtoKey p.

# Constants

PROTO_CONTENT_MSG corresponds to content field serialised in TelemetryRowGPB message.
PROTO_KEYS_MSG corresponds to keys field serialised in TelemetryRowGPB message.
PROTO_LEGACY_COMBINED_KEYS_AND_CONTENT_MSG, not populated anymore, but used to support legacy cases where keys and content used to be combined.

# Structs

ProtoKey identifies which proto messages we are looking for.
ProtoMsgs are an ordered collection of reflect.Type objects.
Telemetry message is the outermost payload message used to stream telemetry in a Model Driven Telemetry (MDT) system.
No description provided by the author
No description provided by the author
TelemetryField messages are used to export content in the self describing GPB KV form.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TelemetryGPBTable contains a repeated number of TelemetryRowGPB, each of which represents content from a subtree instance in the the YANG model.
TelemetryRowGPB, in conjunction with the Telemetry encoding_path and model_version, unambiguously represents the root of a subtree in the YANG model, and content from that subtree encoded in serialised GPB messages.

# Type aliases

No description provided by the author