gnmi

package
v2.1.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2018 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package gnmi is a generated protocol buffer package.

Package gNMI defines a service specification for the gRPC Network Management Interface. This interface is defined to be a standard interface via which a network management system ("client") can subscribe to state values, retrieve snapshots of state information, and manipulate the state of a data tree supported by a device ("target").

This document references the gNMI Specification which can be found at http://github.com/openconfig/reference/blob/master/rpc/gnmi

It is generated from these files:

gnmi.proto

It has these top-level messages:

Notification
Update
TypedValue
Path
PathElem
Value
Error
Decimal64
ScalarArray
SubscribeRequest
Poll
SubscribeResponse
SubscriptionList
Subscription
QOSMarking
Alias
AliasList
SetRequest
SetResponse
UpdateResult
GetRequest
GetResponse
CapabilityRequest
CapabilityResponse
ModelData

Index

Constants

This section is empty.

Variables

View Source
var E_GnmiService = &proto.ExtensionDesc{
	ExtendedType:  (*google_protobuf1.FileOptions)(nil),
	ExtensionType: (*string)(nil),
	Field:         1001,
	Name:          "gnmi.gnmi_service",
	Tag:           "bytes,1001,opt,name=gnmi_service,json=gnmiService",
	Filename:      "gnmi.proto",
}
View Source
var Encoding_name = map[int32]string{
	0: "JSON",
	1: "BYTES",
	2: "PROTO",
	3: "ASCII",
	4: "JSON_IETF",
}
View Source
var Encoding_value = map[string]int32{
	"JSON":      0,
	"BYTES":     1,
	"PROTO":     2,
	"ASCII":     3,
	"JSON_IETF": 4,
}
View Source
var GetRequest_DataType_name = map[int32]string{
	0: "ALL",
	1: "CONFIG",
	2: "STATE",
	3: "OPERATIONAL",
}
View Source
var GetRequest_DataType_value = map[string]int32{
	"ALL":         0,
	"CONFIG":      1,
	"STATE":       2,
	"OPERATIONAL": 3,
}
View Source
var SubscriptionList_Mode_name = map[int32]string{
	0: "STREAM",
	1: "ONCE",
	2: "POLL",
}
View Source
var SubscriptionList_Mode_value = map[string]int32{
	"STREAM": 0,
	"ONCE":   1,
	"POLL":   2,
}
View Source
var SubscriptionMode_name = map[int32]string{
	0: "TARGET_DEFINED",
	1: "ON_CHANGE",
	2: "SAMPLE",
}
View Source
var SubscriptionMode_value = map[string]int32{
	"TARGET_DEFINED": 0,
	"ON_CHANGE":      1,
	"SAMPLE":         2,
}
View Source
var UpdateResult_Operation_name = map[int32]string{
	0: "INVALID",
	1: "DELETE",
	2: "REPLACE",
	3: "UPDATE",
}
View Source
var UpdateResult_Operation_value = map[string]int32{
	"INVALID": 0,
	"DELETE":  1,
	"REPLACE": 2,
	"UPDATE":  3,
}

Functions

func RegisterGNMIServer

func RegisterGNMIServer(s *grpc.Server, srv GNMIServer)

Types

type Alias

type Alias struct {
	Path  *Path  `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
	Alias string `protobuf:"bytes,2,opt,name=alias" json:"alias,omitempty"`
}

Alias specifies a data tree path, and an associated string which defines an alias which is to be used for this path in the context of the RPC. The alias is specified as a string which is prefixed with "#" to disambiguate it from data tree element paths. Reference: gNMI Specification Section 2.4.2

func (*Alias) Descriptor

func (*Alias) Descriptor() ([]byte, []int)

func (*Alias) GetAlias

func (m *Alias) GetAlias() string

func (*Alias) GetPath

func (m *Alias) GetPath() *Path

func (*Alias) ProtoMessage

func (*Alias) ProtoMessage()

func (*Alias) Reset

func (m *Alias) Reset()

func (*Alias) String

func (m *Alias) String() string

type AliasList

type AliasList struct {
	Alias []*Alias `protobuf:"bytes,1,rep,name=alias" json:"alias,omitempty"`
}

AliasList specifies a list of aliases. It is used in a SubscribeRequest for a client to create a set of aliases that the target is to utilize. Reference: gNMI Specification Section 3.5.1.6

func (*AliasList) Descriptor

func (*AliasList) Descriptor() ([]byte, []int)

func (*AliasList) GetAlias

func (m *AliasList) GetAlias() []*Alias

func (*AliasList) ProtoMessage

func (*AliasList) ProtoMessage()

func (*AliasList) Reset

func (m *AliasList) Reset()

func (*AliasList) String

func (m *AliasList) String() string

type CapabilityRequest

type CapabilityRequest struct {
}

CapabilityRequest is sent by the client in the Capabilities RPC to request that the target reports its capabilities. Reference: gNMI Specification Section 3.2.1

func (*CapabilityRequest) Descriptor

func (*CapabilityRequest) Descriptor() ([]byte, []int)

func (*CapabilityRequest) ProtoMessage

func (*CapabilityRequest) ProtoMessage()

func (*CapabilityRequest) Reset

func (m *CapabilityRequest) Reset()

func (*CapabilityRequest) String

func (m *CapabilityRequest) String() string

type CapabilityResponse

type CapabilityResponse struct {
	SupportedModels    []*ModelData `protobuf:"bytes,1,rep,name=supported_models,json=supportedModels" json:"supported_models,omitempty"`
	SupportedEncodings []Encoding   `` /* 135-byte string literal not displayed */
	GNMIVersion        string       `protobuf:"bytes,3,opt,name=gNMI_version,json=gNMIVersion" json:"gNMI_version,omitempty"`
}

CapabilityResponse is used by the target to report its capabilities to the client within the Capabilities RPC. Reference: gNMI Specification Section 3.2.2

func (*CapabilityResponse) Descriptor

func (*CapabilityResponse) Descriptor() ([]byte, []int)

func (*CapabilityResponse) GetGNMIVersion

func (m *CapabilityResponse) GetGNMIVersion() string

func (*CapabilityResponse) GetSupportedEncodings

func (m *CapabilityResponse) GetSupportedEncodings() []Encoding

func (*CapabilityResponse) GetSupportedModels

func (m *CapabilityResponse) GetSupportedModels() []*ModelData

func (*CapabilityResponse) ProtoMessage

func (*CapabilityResponse) ProtoMessage()

func (*CapabilityResponse) Reset

func (m *CapabilityResponse) Reset()

func (*CapabilityResponse) String

func (m *CapabilityResponse) String() string

type Decimal64

type Decimal64 struct {
	Digits    int64  `protobuf:"varint,1,opt,name=digits" json:"digits,omitempty"`
	Precision uint32 `protobuf:"varint,2,opt,name=precision" json:"precision,omitempty"`
}

Decimal64 is used to encode a fixed precision decimal number. The value is expressed as a set of digits with the precision specifying the number of digits following the decimal point in the digit set.

func (*Decimal64) Descriptor

func (*Decimal64) Descriptor() ([]byte, []int)

func (*Decimal64) GetDigits

func (m *Decimal64) GetDigits() int64

func (*Decimal64) GetPrecision

func (m *Decimal64) GetPrecision() uint32

func (*Decimal64) ProtoMessage

func (*Decimal64) ProtoMessage()

func (*Decimal64) Reset

func (m *Decimal64) Reset()

func (*Decimal64) String

func (m *Decimal64) String() string

type Encoding

type Encoding int32

Encoding defines the value encoding formats that are supported by the gNMI protocol. These encodings are used by both the client (when sending Set messages to modify the state of the target) and the target when serializing data to be returned to the client (in both Subscribe and Get RPCs). Reference: gNMI Specification Section 2.3

const (
	Encoding_JSON      Encoding = 0
	Encoding_BYTES     Encoding = 1
	Encoding_PROTO     Encoding = 2
	Encoding_ASCII     Encoding = 3
	Encoding_JSON_IETF Encoding = 4
)

func (Encoding) EnumDescriptor

func (Encoding) EnumDescriptor() ([]byte, []int)

func (Encoding) String

func (x Encoding) String() string

type Error

type Error struct {
	Code    uint32               `protobuf:"varint,1,opt,name=code" json:"code,omitempty"`
	Message string               `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	Data    *google_protobuf.Any `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
}

Error message previously utilised to return errors to the client. Deprecated in favour of using the google.golang.org/genproto/googleapis/rpc/status message in the RPC response. Reference: gNMI Specification Section 2.5

func (*Error) Descriptor

func (*Error) Descriptor() ([]byte, []int)

func (*Error) GetCode

func (m *Error) GetCode() uint32

func (*Error) GetData

func (m *Error) GetData() *google_protobuf.Any

func (*Error) GetMessage

func (m *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) Reset

func (m *Error) Reset()

func (*Error) String

func (m *Error) String() string

type GNMIClient

type GNMIClient interface {
	// Capabilities allows the client to retrieve the set of capabilities that
	// is supported by the target. This allows the target to validate the
	// service version that is implemented and retrieve the set of models that
	// the target supports. The models can then be specified in subsequent RPCs
	// to restrict the set of data that is utilized.
	// Reference: gNMI Specification Section 3.2
	Capabilities(ctx context.Context, in *CapabilityRequest, opts ...grpc.CallOption) (*CapabilityResponse, error)
	// Retrieve a snapshot of data from the target. A Get RPC requests that the
	// target snapshots a subset of the data tree as specified by the paths
	// included in the message and serializes this to be returned to the
	// client using the specified encoding.
	// Reference: gNMI Specification Section 3.3
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	// Set allows the client to modify the state of data on the target. The
	// paths to modified along with the new values that the client wishes
	// to set the value to.
	// Reference: gNMI Specification Section 3.4
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
	// Subscribe allows a client to request the target to send it values
	// of particular paths within the data tree. These values may be streamed
	// at a particular cadence (STREAM), sent one off on a long-lived channel
	// (POLL), or sent as a one-off retrieval (ONCE).
	// Reference: gNMI Specification Section 3.5
	Subscribe(ctx context.Context, opts ...grpc.CallOption) (GNMI_SubscribeClient, error)
}

func NewGNMIClient

func NewGNMIClient(cc *grpc.ClientConn) GNMIClient

type GNMIServer

type GNMIServer interface {
	// Capabilities allows the client to retrieve the set of capabilities that
	// is supported by the target. This allows the target to validate the
	// service version that is implemented and retrieve the set of models that
	// the target supports. The models can then be specified in subsequent RPCs
	// to restrict the set of data that is utilized.
	// Reference: gNMI Specification Section 3.2
	Capabilities(context.Context, *CapabilityRequest) (*CapabilityResponse, error)
	// Retrieve a snapshot of data from the target. A Get RPC requests that the
	// target snapshots a subset of the data tree as specified by the paths
	// included in the message and serializes this to be returned to the
	// client using the specified encoding.
	// Reference: gNMI Specification Section 3.3
	Get(context.Context, *GetRequest) (*GetResponse, error)
	// Set allows the client to modify the state of data on the target. The
	// paths to modified along with the new values that the client wishes
	// to set the value to.
	// Reference: gNMI Specification Section 3.4
	Set(context.Context, *SetRequest) (*SetResponse, error)
	// Subscribe allows a client to request the target to send it values
	// of particular paths within the data tree. These values may be streamed
	// at a particular cadence (STREAM), sent one off on a long-lived channel
	// (POLL), or sent as a one-off retrieval (ONCE).
	// Reference: gNMI Specification Section 3.5
	Subscribe(GNMI_SubscribeServer) error
}

type GNMI_SubscribeClient

type GNMI_SubscribeClient interface {
	Send(*SubscribeRequest) error
	Recv() (*SubscribeResponse, error)
	grpc.ClientStream
}

type GNMI_SubscribeServer

type GNMI_SubscribeServer interface {
	Send(*SubscribeResponse) error
	Recv() (*SubscribeRequest, error)
	grpc.ServerStream
}

type GetRequest

type GetRequest struct {
	Prefix    *Path               `protobuf:"bytes,1,opt,name=prefix" json:"prefix,omitempty"`
	Path      []*Path             `protobuf:"bytes,2,rep,name=path" json:"path,omitempty"`
	Type      GetRequest_DataType `protobuf:"varint,3,opt,name=type,enum=gnmi.GetRequest_DataType" json:"type,omitempty"`
	Encoding  Encoding            `protobuf:"varint,5,opt,name=encoding,enum=gnmi.Encoding" json:"encoding,omitempty"`
	UseModels []*ModelData        `protobuf:"bytes,6,rep,name=use_models,json=useModels" json:"use_models,omitempty"`
}

GetRequest is sent when a client initiates a Get RPC. It is used to specify the set of data elements for which the target should return a snapshot of data. The use_models field specifies the set of schema modules that are to be used by the target - where use_models is not specified then the target must use all schema models that it has. Reference: gNMI Specification Section 3.3.1

func (*GetRequest) Descriptor

func (*GetRequest) Descriptor() ([]byte, []int)

func (*GetRequest) GetEncoding

func (m *GetRequest) GetEncoding() Encoding

func (*GetRequest) GetPath

func (m *GetRequest) GetPath() []*Path

func (*GetRequest) GetPrefix

func (m *GetRequest) GetPrefix() *Path

func (*GetRequest) GetType

func (m *GetRequest) GetType() GetRequest_DataType

func (*GetRequest) GetUseModels

func (m *GetRequest) GetUseModels() []*ModelData

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

type GetRequest_DataType

type GetRequest_DataType int32

Type of elements within the data tree.

const (
	GetRequest_ALL    GetRequest_DataType = 0
	GetRequest_CONFIG GetRequest_DataType = 1
	GetRequest_STATE  GetRequest_DataType = 2
	// Data elements marked in the schema as operational. This refers to data
	// elements whose value relates to the state of processes or interactions
	// running on the device.
	GetRequest_OPERATIONAL GetRequest_DataType = 3
)

func (GetRequest_DataType) EnumDescriptor

func (GetRequest_DataType) EnumDescriptor() ([]byte, []int)

func (GetRequest_DataType) String

func (x GetRequest_DataType) String() string

type GetResponse

type GetResponse struct {
	Notification []*Notification `protobuf:"bytes,1,rep,name=notification" json:"notification,omitempty"`
	Error        *Error          `protobuf:"bytes,2,opt,name=error" json:"error,omitempty"`
}

GetResponse is used by the target to respond to a GetRequest from a client. The set of Notifications corresponds to the data values that are requested by the client in the GetRequest. Reference: gNMI Specification Section 3.3.2

func (*GetResponse) Descriptor

func (*GetResponse) Descriptor() ([]byte, []int)

func (*GetResponse) GetError

func (m *GetResponse) GetError() *Error

func (*GetResponse) GetNotification

func (m *GetResponse) GetNotification() []*Notification

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) String

func (m *GetResponse) String() string

type ModelData

type ModelData struct {
	Name         string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Organization string `protobuf:"bytes,2,opt,name=organization" json:"organization,omitempty"`
	Version      string `protobuf:"bytes,3,opt,name=version" json:"version,omitempty"`
}

ModelData is used to describe a set of schema modules. It can be used in a CapabilityResponse where a target reports the set of modules that it supports, and within the SubscribeRequest and GetRequest messages to specify the set of models from which data tree elements should be reported. Reference: gNMI Specification Section 3.2.3

func (*ModelData) Descriptor

func (*ModelData) Descriptor() ([]byte, []int)

func (*ModelData) GetName

func (m *ModelData) GetName() string

func (*ModelData) GetOrganization

func (m *ModelData) GetOrganization() string

func (*ModelData) GetVersion

func (m *ModelData) GetVersion() string

func (*ModelData) ProtoMessage

func (*ModelData) ProtoMessage()

func (*ModelData) Reset

func (m *ModelData) Reset()

func (*ModelData) String

func (m *ModelData) String() string

type Notification

type Notification struct {
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"`
	Prefix    *Path `protobuf:"bytes,2,opt,name=prefix" json:"prefix,omitempty"`
	// An alias for the path specified in the prefix field.
	// Reference: gNMI Specification Section 2.4.2
	Alias  string    `protobuf:"bytes,3,opt,name=alias" json:"alias,omitempty"`
	Update []*Update `protobuf:"bytes,4,rep,name=update" json:"update,omitempty"`
	Delete []*Path   `protobuf:"bytes,5,rep,name=delete" json:"delete,omitempty"`
}

Notification is a re-usable message that is used to encode data from the target to the client. A Notification carries two types of changes to the data tree:

  • Deleted values (delete) - a set of paths that have been removed from the data tree.
  • Updated values (update) - a set of path-value pairs indicating the path whose value has changed in the data tree.

Reference: gNMI Specification Section 2.1

func (*Notification) Descriptor

func (*Notification) Descriptor() ([]byte, []int)

func (*Notification) GetAlias

func (m *Notification) GetAlias() string

func (*Notification) GetDelete

func (m *Notification) GetDelete() []*Path

func (*Notification) GetPrefix

func (m *Notification) GetPrefix() *Path

func (*Notification) GetTimestamp

func (m *Notification) GetTimestamp() int64

func (*Notification) GetUpdate

func (m *Notification) GetUpdate() []*Update

func (*Notification) ProtoMessage

func (*Notification) ProtoMessage()

func (*Notification) Reset

func (m *Notification) Reset()

func (*Notification) String

func (m *Notification) String() string

type Path

type Path struct {
	// Elements of the path are no longer encoded as a string, but rather within
	// the elem field as a PathElem message.
	Element []string    `protobuf:"bytes,1,rep,name=element" json:"element,omitempty"`
	Origin  string      `protobuf:"bytes,2,opt,name=origin" json:"origin,omitempty"`
	Elem    []*PathElem `protobuf:"bytes,3,rep,name=elem" json:"elem,omitempty"`
	Target  string      `protobuf:"bytes,4,opt,name=target" json:"target,omitempty"`
}

Path encodes a data tree path as a series of repeated strings, with each element of the path representing a data tree node name and the associated attributes. Reference: gNMI Specification Section 2.2.2.

func (*Path) Descriptor

func (*Path) Descriptor() ([]byte, []int)

func (*Path) GetElem

func (m *Path) GetElem() []*PathElem

func (*Path) GetElement

func (m *Path) GetElement() []string

func (*Path) GetOrigin

func (m *Path) GetOrigin() string

func (*Path) GetTarget

func (m *Path) GetTarget() string

func (*Path) ProtoMessage

func (*Path) ProtoMessage()

func (*Path) Reset

func (m *Path) Reset()

func (*Path) String

func (m *Path) String() string

type PathElem

type PathElem struct {
	Name string            `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Key  map[string]string `` /* 126-byte string literal not displayed */
}

PathElem encodes an element of a gNMI path, along ith any attributes (keys) that may be associated with it. Reference: gNMI Specification Section 2.2.2.

func (*PathElem) Descriptor

func (*PathElem) Descriptor() ([]byte, []int)

func (*PathElem) GetKey

func (m *PathElem) GetKey() map[string]string

func (*PathElem) GetName

func (m *PathElem) GetName() string

func (*PathElem) ProtoMessage

func (*PathElem) ProtoMessage()

func (*PathElem) Reset

func (m *PathElem) Reset()

func (*PathElem) String

func (m *PathElem) String() string

type Poll

type Poll struct {
}

Poll is sent within a SubscribeRequest to trigger the device to send telemetry updates for the paths that are associated with the subscription. Reference: gNMI Specification Section Section 3.5.1.4

func (*Poll) Descriptor

func (*Poll) Descriptor() ([]byte, []int)

func (*Poll) ProtoMessage

func (*Poll) ProtoMessage()

func (*Poll) Reset

func (m *Poll) Reset()

func (*Poll) String

func (m *Poll) String() string

type QOSMarking

type QOSMarking struct {
	Marking uint32 `protobuf:"varint,1,opt,name=marking" json:"marking,omitempty"`
}

QOSMarking specifies the DSCP value to be set on transmitted telemetry updates from the target. Reference: gNMI Specification Section 3.5.1.2

func (*QOSMarking) Descriptor

func (*QOSMarking) Descriptor() ([]byte, []int)

func (*QOSMarking) GetMarking

func (m *QOSMarking) GetMarking() uint32

func (*QOSMarking) ProtoMessage

func (*QOSMarking) ProtoMessage()

func (*QOSMarking) Reset

func (m *QOSMarking) Reset()

func (*QOSMarking) String

func (m *QOSMarking) String() string

type ScalarArray

type ScalarArray struct {
	// The set of elements within the array. Each TypedValue message should
	// specify only elements that have a field identifier of 1-7 (i.e., the
	// values are scalar values).
	Element []*TypedValue `protobuf:"bytes,1,rep,name=element" json:"element,omitempty"`
}

ScalarArray is used to encode a mixed-type array of values.

func (*ScalarArray) Descriptor

func (*ScalarArray) Descriptor() ([]byte, []int)

func (*ScalarArray) GetElement

func (m *ScalarArray) GetElement() []*TypedValue

func (*ScalarArray) ProtoMessage

func (*ScalarArray) ProtoMessage()

func (*ScalarArray) Reset

func (m *ScalarArray) Reset()

func (*ScalarArray) String

func (m *ScalarArray) String() string

type SetRequest

type SetRequest struct {
	Prefix  *Path     `protobuf:"bytes,1,opt,name=prefix" json:"prefix,omitempty"`
	Delete  []*Path   `protobuf:"bytes,2,rep,name=delete" json:"delete,omitempty"`
	Replace []*Update `protobuf:"bytes,3,rep,name=replace" json:"replace,omitempty"`
	Update  []*Update `protobuf:"bytes,4,rep,name=update" json:"update,omitempty"`
}

SetRequest is sent from a client to the target to update values in the data tree. Paths are either deleted by the client, or modified by means of being updated, or replaced. Where a replace is used, unspecified values are considered to be replaced, whereas when update is used the changes are considered to be incremental. The set of changes that are specified within a single SetRequest are considered to be a transaction. Reference: gNMI Specification Section 3.4.1

func (*SetRequest) Descriptor

func (*SetRequest) Descriptor() ([]byte, []int)

func (*SetRequest) GetDelete

func (m *SetRequest) GetDelete() []*Path

func (*SetRequest) GetPrefix

func (m *SetRequest) GetPrefix() *Path

func (*SetRequest) GetReplace

func (m *SetRequest) GetReplace() []*Update

func (*SetRequest) GetUpdate

func (m *SetRequest) GetUpdate() []*Update

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) Reset

func (m *SetRequest) Reset()

func (*SetRequest) String

func (m *SetRequest) String() string

type SetResponse

type SetResponse struct {
	Prefix *Path `protobuf:"bytes,1,opt,name=prefix" json:"prefix,omitempty"`
	// A set of responses specifying the result of the operations specified in
	// the SetRequest.
	Response  []*UpdateResult `protobuf:"bytes,2,rep,name=response" json:"response,omitempty"`
	Message   *Error          `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"`
	Timestamp int64           `protobuf:"varint,4,opt,name=timestamp" json:"timestamp,omitempty"`
}

SetResponse is the response to a SetRequest, sent from the target to the client. It reports the result of the modifications to the data tree that were specified by the client. Errors for this RPC should be reported using the https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto message in the RPC return. The gnmi.Error message can be used to add additional details where required. Reference: gNMI Specification Section 3.4.2

func (*SetResponse) Descriptor

func (*SetResponse) Descriptor() ([]byte, []int)

func (*SetResponse) GetMessage

func (m *SetResponse) GetMessage() *Error

func (*SetResponse) GetPrefix

func (m *SetResponse) GetPrefix() *Path

func (*SetResponse) GetResponse

func (m *SetResponse) GetResponse() []*UpdateResult

func (*SetResponse) GetTimestamp

func (m *SetResponse) GetTimestamp() int64

func (*SetResponse) ProtoMessage

func (*SetResponse) ProtoMessage()

func (*SetResponse) Reset

func (m *SetResponse) Reset()

func (*SetResponse) String

func (m *SetResponse) String() string

type SubscribeRequest

type SubscribeRequest struct {
	// Types that are valid to be assigned to Request:
	//	*SubscribeRequest_Subscribe
	//	*SubscribeRequest_Poll
	//	*SubscribeRequest_Aliases
	Request isSubscribeRequest_Request `protobuf_oneof:"request"`
}

SubscribeRequest is the message sent by the client to the target when initiating a subscription to a set of paths within the data tree. The request field must be populated and the initial message must specify a SubscriptionList to initiate a subscription. The message is subsequently used to define aliases or trigger polled data to be sent by the target. Reference: gNMI Specification Section 3.5.1.1

func (*SubscribeRequest) Descriptor

func (*SubscribeRequest) Descriptor() ([]byte, []int)

func (*SubscribeRequest) GetAliases

func (m *SubscribeRequest) GetAliases() *AliasList

func (*SubscribeRequest) GetPoll

func (m *SubscribeRequest) GetPoll() *Poll

func (*SubscribeRequest) GetRequest

func (m *SubscribeRequest) GetRequest() isSubscribeRequest_Request

func (*SubscribeRequest) GetSubscribe

func (m *SubscribeRequest) GetSubscribe() *SubscriptionList

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) Reset

func (m *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (m *SubscribeRequest) String() string

func (*SubscribeRequest) XXX_OneofFuncs

func (*SubscribeRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type SubscribeRequest_Aliases

type SubscribeRequest_Aliases struct {
	Aliases *AliasList `protobuf:"bytes,4,opt,name=aliases,oneof"`
}

type SubscribeRequest_Poll

type SubscribeRequest_Poll struct {
	Poll *Poll `protobuf:"bytes,3,opt,name=poll,oneof"`
}

type SubscribeRequest_Subscribe

type SubscribeRequest_Subscribe struct {
	Subscribe *SubscriptionList `protobuf:"bytes,1,opt,name=subscribe,oneof"`
}

type SubscribeResponse

type SubscribeResponse struct {
	// Types that are valid to be assigned to Response:
	//	*SubscribeResponse_Update
	//	*SubscribeResponse_SyncResponse
	//	*SubscribeResponse_Error
	Response isSubscribeResponse_Response `protobuf_oneof:"response"`
}

SubscribeResponse is the message used by the target within a Subscribe RPC. The target includes a Notification message which is used to transmit values of the path(s) that are associated with the subscription. The same message is to indicate that the target has sent all data values once (is synchronized). Reference: gNMI Specification Section 3.5.1.4

func (*SubscribeResponse) Descriptor

func (*SubscribeResponse) Descriptor() ([]byte, []int)

func (*SubscribeResponse) GetError

func (m *SubscribeResponse) GetError() *Error

func (*SubscribeResponse) GetResponse

func (m *SubscribeResponse) GetResponse() isSubscribeResponse_Response

func (*SubscribeResponse) GetSyncResponse

func (m *SubscribeResponse) GetSyncResponse() bool

func (*SubscribeResponse) GetUpdate

func (m *SubscribeResponse) GetUpdate() *Notification

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) Reset

func (m *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (m *SubscribeResponse) String() string

func (*SubscribeResponse) XXX_OneofFuncs

func (*SubscribeResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type SubscribeResponse_Error

type SubscribeResponse_Error struct {
	Error *Error `protobuf:"bytes,4,opt,name=error,oneof"`
}

type SubscribeResponse_SyncResponse

type SubscribeResponse_SyncResponse struct {
	SyncResponse bool `protobuf:"varint,3,opt,name=sync_response,json=syncResponse,oneof"`
}

type SubscribeResponse_Update

type SubscribeResponse_Update struct {
	Update *Notification `protobuf:"bytes,1,opt,name=update,oneof"`
}

type Subscription

type Subscription struct {
	Path           *Path            `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
	Mode           SubscriptionMode `protobuf:"varint,2,opt,name=mode,enum=gnmi.SubscriptionMode" json:"mode,omitempty"`
	SampleInterval uint64           `protobuf:"varint,3,opt,name=sample_interval,json=sampleInterval" json:"sample_interval,omitempty"`
	// Indicates whether values that not changed should be sent in a SAMPLE
	// subscription.
	SuppressRedundant bool `protobuf:"varint,4,opt,name=suppress_redundant,json=suppressRedundant" json:"suppress_redundant,omitempty"`
	// Specifies the maximum allowable silent period in nanoseconds when
	// suppress_redundant is in use. The target should send a value at least once
	// in the period specified.
	HeartbeatInterval uint64 `protobuf:"varint,5,opt,name=heartbeat_interval,json=heartbeatInterval" json:"heartbeat_interval,omitempty"`
}

Subscription is a single request within a SubscriptionList. The path specified is interpreted (along with the prefix) as the elements of the data tree that the client is subscribing to. The mode determines how the target should trigger updates to be sent. Reference: gNMI Specification Section 3.5.1.3

func (*Subscription) Descriptor

func (*Subscription) Descriptor() ([]byte, []int)

func (*Subscription) GetHeartbeatInterval

func (m *Subscription) GetHeartbeatInterval() uint64

func (*Subscription) GetMode

func (m *Subscription) GetMode() SubscriptionMode

func (*Subscription) GetPath

func (m *Subscription) GetPath() *Path

func (*Subscription) GetSampleInterval

func (m *Subscription) GetSampleInterval() uint64

func (*Subscription) GetSuppressRedundant

func (m *Subscription) GetSuppressRedundant() bool

func (*Subscription) ProtoMessage

func (*Subscription) ProtoMessage()

func (*Subscription) Reset

func (m *Subscription) Reset()

func (*Subscription) String

func (m *Subscription) String() string

type SubscriptionList

type SubscriptionList struct {
	Prefix       *Path           `protobuf:"bytes,1,opt,name=prefix" json:"prefix,omitempty"`
	Subscription []*Subscription `protobuf:"bytes,2,rep,name=subscription" json:"subscription,omitempty"`
	// Whether target defined aliases are allowed within the subscription.
	UseAliases bool                  `protobuf:"varint,3,opt,name=use_aliases,json=useAliases" json:"use_aliases,omitempty"`
	Qos        *QOSMarking           `protobuf:"bytes,4,opt,name=qos" json:"qos,omitempty"`
	Mode       SubscriptionList_Mode `protobuf:"varint,5,opt,name=mode,enum=gnmi.SubscriptionList_Mode" json:"mode,omitempty"`
	// Whether elements of the schema that are marked as eligible for aggregation
	// should be aggregated or not.
	AllowAggregation bool `protobuf:"varint,6,opt,name=allow_aggregation,json=allowAggregation" json:"allow_aggregation,omitempty"`
	// The set of schemas that define the elements of the data tree that should
	// be sent by the target.
	UseModels []*ModelData `protobuf:"bytes,7,rep,name=use_models,json=useModels" json:"use_models,omitempty"`
	// The encoding that the target should use within the Notifications generated
	// corresponding to the SubscriptionList.
	Encoding Encoding `protobuf:"varint,8,opt,name=encoding,enum=gnmi.Encoding" json:"encoding,omitempty"`
	// An optional field to specify that only updates to current state should be
	// sent to a client. If set, the initial state is not sent to the client but
	// rather only the sync message followed by any subsequent updates to the
	// current state. For ONCE and POLL modes, this causes the server to send only
	// the sync message (Sec. 3.5.2.3).
	UpdatesOnly bool `protobuf:"varint,9,opt,name=updates_only,json=updatesOnly" json:"updates_only,omitempty"`
}

SubscriptionList is used within a Subscribe message to specify the list of paths that the client wishes to subscribe to. The message consists of a list of (possibly prefixed) paths, and options that relate to the subscription. Reference: gNMI Specification Section 3.5.1.2

func (*SubscriptionList) Descriptor

func (*SubscriptionList) Descriptor() ([]byte, []int)

func (*SubscriptionList) GetAllowAggregation

func (m *SubscriptionList) GetAllowAggregation() bool

func (*SubscriptionList) GetEncoding

func (m *SubscriptionList) GetEncoding() Encoding

func (*SubscriptionList) GetMode

func (*SubscriptionList) GetPrefix

func (m *SubscriptionList) GetPrefix() *Path

func (*SubscriptionList) GetQos

func (m *SubscriptionList) GetQos() *QOSMarking

func (*SubscriptionList) GetSubscription

func (m *SubscriptionList) GetSubscription() []*Subscription

func (*SubscriptionList) GetUpdatesOnly

func (m *SubscriptionList) GetUpdatesOnly() bool

func (*SubscriptionList) GetUseAliases

func (m *SubscriptionList) GetUseAliases() bool

func (*SubscriptionList) GetUseModels

func (m *SubscriptionList) GetUseModels() []*ModelData

func (*SubscriptionList) ProtoMessage

func (*SubscriptionList) ProtoMessage()

func (*SubscriptionList) Reset

func (m *SubscriptionList) Reset()

func (*SubscriptionList) String

func (m *SubscriptionList) String() string

type SubscriptionList_Mode

type SubscriptionList_Mode int32

Mode of the subscription.

const (
	SubscriptionList_STREAM SubscriptionList_Mode = 0
	SubscriptionList_ONCE   SubscriptionList_Mode = 1
	SubscriptionList_POLL   SubscriptionList_Mode = 2
)

func (SubscriptionList_Mode) EnumDescriptor

func (SubscriptionList_Mode) EnumDescriptor() ([]byte, []int)

func (SubscriptionList_Mode) String

func (x SubscriptionList_Mode) String() string

type SubscriptionMode

type SubscriptionMode int32

SubscriptionMode is the mode of the subscription, specifying how the target must return values in a subscription. Reference: gNMI Specification Section 3.5.1.3

const (
	SubscriptionMode_TARGET_DEFINED SubscriptionMode = 0
	SubscriptionMode_ON_CHANGE      SubscriptionMode = 1
	SubscriptionMode_SAMPLE         SubscriptionMode = 2
)

func (SubscriptionMode) EnumDescriptor

func (SubscriptionMode) EnumDescriptor() ([]byte, []int)

func (SubscriptionMode) String

func (x SubscriptionMode) String() string

type TypedValue

type TypedValue struct {
	// One of the fields within the val oneof is populated with the value
	// of the update. The type of the value being included in the Update
	// determines which field should be populated. In the case that the
	// encoding is a particular form of the base protobuf type, a specific
	// field is used to store the value (e.g., json_val).
	//
	// Types that are valid to be assigned to Value:
	//	*TypedValue_StringVal
	//	*TypedValue_IntVal
	//	*TypedValue_UintVal
	//	*TypedValue_BoolVal
	//	*TypedValue_BytesVal
	//	*TypedValue_FloatVal
	//	*TypedValue_DecimalVal
	//	*TypedValue_LeaflistVal
	//	*TypedValue_AnyVal
	//	*TypedValue_JsonVal
	//	*TypedValue_JsonIetfVal
	//	*TypedValue_AsciiVal
	Value isTypedValue_Value `protobuf_oneof:"value"`
}

TypedValue is used to encode a value being sent between the client and target (originated by either entity).

func (*TypedValue) Descriptor

func (*TypedValue) Descriptor() ([]byte, []int)

func (*TypedValue) GetAnyVal

func (m *TypedValue) GetAnyVal() *google_protobuf.Any

func (*TypedValue) GetAsciiVal

func (m *TypedValue) GetAsciiVal() string

func (*TypedValue) GetBoolVal

func (m *TypedValue) GetBoolVal() bool

func (*TypedValue) GetBytesVal

func (m *TypedValue) GetBytesVal() []byte

func (*TypedValue) GetDecimalVal

func (m *TypedValue) GetDecimalVal() *Decimal64

func (*TypedValue) GetFloatVal

func (m *TypedValue) GetFloatVal() float32

func (*TypedValue) GetIntVal

func (m *TypedValue) GetIntVal() int64

func (*TypedValue) GetJsonIetfVal

func (m *TypedValue) GetJsonIetfVal() []byte

func (*TypedValue) GetJsonVal

func (m *TypedValue) GetJsonVal() []byte

func (*TypedValue) GetLeaflistVal

func (m *TypedValue) GetLeaflistVal() *ScalarArray

func (*TypedValue) GetStringVal

func (m *TypedValue) GetStringVal() string

func (*TypedValue) GetUintVal

func (m *TypedValue) GetUintVal() uint64

func (*TypedValue) GetValue

func (m *TypedValue) GetValue() isTypedValue_Value

func (*TypedValue) ProtoMessage

func (*TypedValue) ProtoMessage()

func (*TypedValue) Reset

func (m *TypedValue) Reset()

func (*TypedValue) String

func (m *TypedValue) String() string

func (*TypedValue) XXX_OneofFuncs

func (*TypedValue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type TypedValue_AnyVal

type TypedValue_AnyVal struct {
	AnyVal *google_protobuf.Any `protobuf:"bytes,9,opt,name=any_val,json=anyVal,oneof"`
}

type TypedValue_AsciiVal

type TypedValue_AsciiVal struct {
	AsciiVal string `protobuf:"bytes,12,opt,name=ascii_val,json=asciiVal,oneof"`
}

type TypedValue_BoolVal

type TypedValue_BoolVal struct {
	BoolVal bool `protobuf:"varint,4,opt,name=bool_val,json=boolVal,oneof"`
}

type TypedValue_BytesVal

type TypedValue_BytesVal struct {
	BytesVal []byte `protobuf:"bytes,5,opt,name=bytes_val,json=bytesVal,proto3,oneof"`
}

type TypedValue_DecimalVal

type TypedValue_DecimalVal struct {
	DecimalVal *Decimal64 `protobuf:"bytes,7,opt,name=decimal_val,json=decimalVal,oneof"`
}

type TypedValue_FloatVal

type TypedValue_FloatVal struct {
	FloatVal float32 `protobuf:"fixed32,6,opt,name=float_val,json=floatVal,oneof"`
}

type TypedValue_IntVal

type TypedValue_IntVal struct {
	IntVal int64 `protobuf:"varint,2,opt,name=int_val,json=intVal,oneof"`
}

type TypedValue_JsonIetfVal

type TypedValue_JsonIetfVal struct {
	JsonIetfVal []byte `protobuf:"bytes,11,opt,name=json_ietf_val,json=jsonIetfVal,proto3,oneof"`
}

type TypedValue_JsonVal

type TypedValue_JsonVal struct {
	JsonVal []byte `protobuf:"bytes,10,opt,name=json_val,json=jsonVal,proto3,oneof"`
}

type TypedValue_LeaflistVal

type TypedValue_LeaflistVal struct {
	LeaflistVal *ScalarArray `protobuf:"bytes,8,opt,name=leaflist_val,json=leaflistVal,oneof"`
}

type TypedValue_StringVal

type TypedValue_StringVal struct {
	StringVal string `protobuf:"bytes,1,opt,name=string_val,json=stringVal,oneof"`
}

type TypedValue_UintVal

type TypedValue_UintVal struct {
	UintVal uint64 `protobuf:"varint,3,opt,name=uint_val,json=uintVal,oneof"`
}

type Update

type Update struct {
	Path       *Path       `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
	Value      *Value      `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
	Val        *TypedValue `protobuf:"bytes,3,opt,name=val" json:"val,omitempty"`
	Duplicates uint32      `protobuf:"varint,4,opt,name=duplicates" json:"duplicates,omitempty"`
}

Update is a re-usable message that is used to store a particular Path, Value pair. Reference: gNMI Specification Section 2.1

func (*Update) Descriptor

func (*Update) Descriptor() ([]byte, []int)

func (*Update) GetDuplicates

func (m *Update) GetDuplicates() uint32

func (*Update) GetPath

func (m *Update) GetPath() *Path

func (*Update) GetVal

func (m *Update) GetVal() *TypedValue

func (*Update) GetValue

func (m *Update) GetValue() *Value

func (*Update) ProtoMessage

func (*Update) ProtoMessage()

func (*Update) Reset

func (m *Update) Reset()

func (*Update) String

func (m *Update) String() string

type UpdateResult

type UpdateResult struct {
	// Deprecated timestamp for the UpdateResult, this field has been
	// replaced by the timestamp within the SetResponse message, since
	// all mutations effected by a set should be applied as a single
	// transaction.
	Timestamp int64                  `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"`
	Path      *Path                  `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
	Message   *Error                 `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"`
	Op        UpdateResult_Operation `protobuf:"varint,4,opt,name=op,enum=gnmi.UpdateResult_Operation" json:"op,omitempty"`
}

UpdateResult is used within the SetResponse message to communicate the result of an operation specified within a SetRequest message. Reference: gNMI Specification Section 3.4.2

func (*UpdateResult) Descriptor

func (*UpdateResult) Descriptor() ([]byte, []int)

func (*UpdateResult) GetMessage

func (m *UpdateResult) GetMessage() *Error

func (*UpdateResult) GetOp

func (*UpdateResult) GetPath

func (m *UpdateResult) GetPath() *Path

func (*UpdateResult) GetTimestamp

func (m *UpdateResult) GetTimestamp() int64

func (*UpdateResult) ProtoMessage

func (*UpdateResult) ProtoMessage()

func (*UpdateResult) Reset

func (m *UpdateResult) Reset()

func (*UpdateResult) String

func (m *UpdateResult) String() string

type UpdateResult_Operation

type UpdateResult_Operation int32

The operation that was associated with the Path specified.

const (
	UpdateResult_INVALID UpdateResult_Operation = 0
	UpdateResult_DELETE  UpdateResult_Operation = 1
	UpdateResult_REPLACE UpdateResult_Operation = 2
	UpdateResult_UPDATE  UpdateResult_Operation = 3
)

func (UpdateResult_Operation) EnumDescriptor

func (UpdateResult_Operation) EnumDescriptor() ([]byte, []int)

func (UpdateResult_Operation) String

func (x UpdateResult_Operation) String() string

type Value

type Value struct {
	Value []byte   `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Type  Encoding `protobuf:"varint,2,opt,name=type,enum=gnmi.Encoding" json:"type,omitempty"`
}

Value encodes a data tree node's value - along with the way in which the value is encoded. This message is deprecated by gNMI 0.3.0. Reference: gNMI Specification Section 2.2.3.

func (*Value) Descriptor

func (*Value) Descriptor() ([]byte, []int)

func (*Value) GetType

func (m *Value) GetType() Encoding

func (*Value) GetValue

func (m *Value) GetValue() []byte

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) String

func (m *Value) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL