Skip to content

Commit

Permalink
added support for bytes encoding (#7938)
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt authored Nov 2, 2020
1 parent 73b2f98 commit 68a4f18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/gnmi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions plugins/inputs/gnmi/gnmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 68a4f18

Please sign in to comment.