added support for bytes encoding (#7938)

This commit is contained in:
Roman Dodin 2020-11-02 17:11:28 +01:00 committed by GitHub
parent 73b2f988c4
commit 68a4f18e3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ It has been optimized to support gNMI telemetry as produced by Cisco IOS XR (64-
username = "cisco"
password = "cisco"
## gNMI encoding requested (one of: "proto", "json", "json_ietf")
## gNMI encoding requested (one of: "proto", "json", "json_ietf", "bytes")
# encoding = "proto"
## redial in case of failures after

View File

@ -179,7 +179,7 @@ func (c *GNMI) newSubscribeRequest() (*gnmi.SubscribeRequest, error) {
return nil, err
}
if c.Encoding != "proto" && c.Encoding != "json" && c.Encoding != "json_ietf" {
if c.Encoding != "proto" && c.Encoding != "json" && c.Encoding != "json_ietf" && c.Encoding != "bytes" {
return nil, fmt.Errorf("unsupported encoding %s", c.Encoding)
}
@ -486,7 +486,7 @@ const sampleConfig = `
username = "cisco"
password = "cisco"
## gNMI encoding requested (one of: "proto", "json", "json_ietf")
## gNMI encoding requested (one of: "proto", "json", "json_ietf", "bytes")
# encoding = "proto"
## redial in case of failures after