Documentation ¶
Overview ¶
Copyright 2016 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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/gnmi.md
It is generated from these files:
github.com/openconfig/reference/rpc/gnmi/gnmi.proto
It has these top-level messages:
Notification Update Path Value Error SubscribeRequest Poll SubscribeResponse SubscriptionList Subscription QOSMarking Alias AliasList SetRequest SetResponse UpdateResult GetRequest GetResponse CapabilityRequest CapabilityResponse ModelData
Index ¶
- Variables
- func RegisterGNMIServer(s *grpc.Server, srv GNMIServer)
- type Alias
- type AliasList
- type CapabilityRequest
- type CapabilityResponse
- func (*CapabilityResponse) Descriptor() ([]byte, []int)
- func (m *CapabilityResponse) GetGNMIVersion() string
- func (m *CapabilityResponse) GetSupportedEncodings() []Encoding
- func (m *CapabilityResponse) GetSupportedModels() []*ModelData
- func (*CapabilityResponse) ProtoMessage()
- func (m *CapabilityResponse) Reset()
- func (m *CapabilityResponse) String() string
- type Encoding
- type Error
- type GNMIClient
- type GNMIServer
- type GNMI_SubscribeClient
- type GNMI_SubscribeServer
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)
- func (m *GetRequest) GetEncoding() Encoding
- func (m *GetRequest) GetPath() []*Path
- func (m *GetRequest) GetPrefix() *Path
- func (m *GetRequest) GetType() GetRequest_DataType
- func (m *GetRequest) GetUseModels() []*ModelData
- func (*GetRequest) ProtoMessage()
- func (m *GetRequest) Reset()
- func (m *GetRequest) String() string
- type GetRequest_DataType
- type GetResponse
- type ModelData
- type Notification
- func (*Notification) Descriptor() ([]byte, []int)
- func (m *Notification) GetAlias() string
- func (m *Notification) GetDelete() []*Path
- func (m *Notification) GetPrefix() *Path
- func (m *Notification) GetTimestamp() int64
- func (m *Notification) GetUpdate() []*Update
- func (*Notification) ProtoMessage()
- func (m *Notification) Reset()
- func (m *Notification) String() string
- type Path
- type Poll
- type QOSMarking
- type SetRequest
- func (*SetRequest) Descriptor() ([]byte, []int)
- func (m *SetRequest) GetDelete() []*Path
- func (m *SetRequest) GetPrefix() *Path
- func (m *SetRequest) GetReplace() []*Update
- func (m *SetRequest) GetUpdate() []*Update
- func (*SetRequest) ProtoMessage()
- func (m *SetRequest) Reset()
- func (m *SetRequest) String() string
- type SetResponse
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)
- func (m *SubscribeRequest) GetAliases() *AliasList
- func (m *SubscribeRequest) GetPoll() *Poll
- func (m *SubscribeRequest) GetRequest() isSubscribeRequest_Request
- func (m *SubscribeRequest) GetSubscribe() *SubscriptionList
- func (*SubscribeRequest) ProtoMessage()
- func (m *SubscribeRequest) Reset()
- func (m *SubscribeRequest) String() string
- func (*SubscribeRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type SubscribeRequest_Aliases
- type SubscribeRequest_Poll
- type SubscribeRequest_Subscribe
- type SubscribeResponse
- func (*SubscribeResponse) Descriptor() ([]byte, []int)
- func (m *SubscribeResponse) GetError() *Error
- func (m *SubscribeResponse) GetResponse() isSubscribeResponse_Response
- func (m *SubscribeResponse) GetSyncResponse() bool
- func (m *SubscribeResponse) GetUpdate() *Notification
- func (*SubscribeResponse) ProtoMessage()
- func (m *SubscribeResponse) Reset()
- func (m *SubscribeResponse) String() string
- func (*SubscribeResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type SubscribeResponse_Error
- type SubscribeResponse_SyncResponse
- type SubscribeResponse_Update
- type Subscription
- func (*Subscription) Descriptor() ([]byte, []int)
- func (m *Subscription) GetHeartbeatInterval() uint64
- func (m *Subscription) GetMode() SubscriptionMode
- func (m *Subscription) GetPath() *Path
- func (m *Subscription) GetSampleInterval() uint64
- func (m *Subscription) GetSuppressRedundant() bool
- func (*Subscription) ProtoMessage()
- func (m *Subscription) Reset()
- func (m *Subscription) String() string
- type SubscriptionList
- func (*SubscriptionList) Descriptor() ([]byte, []int)
- func (m *SubscriptionList) GetAllowAggregation() bool
- func (m *SubscriptionList) GetMode() SubscriptionList_Mode
- func (m *SubscriptionList) GetPrefix() *Path
- func (m *SubscriptionList) GetQos() *QOSMarking
- func (m *SubscriptionList) GetSubscription() []*Subscription
- func (m *SubscriptionList) GetUseAliases() bool
- func (m *SubscriptionList) GetUseModels() []*ModelData
- func (*SubscriptionList) ProtoMessage()
- func (m *SubscriptionList) Reset()
- func (m *SubscriptionList) String() string
- type SubscriptionList_Mode
- type SubscriptionMode
- type Update
- type UpdateResult
- func (*UpdateResult) Descriptor() ([]byte, []int)
- func (m *UpdateResult) GetMessage() *Error
- func (m *UpdateResult) GetOp() UpdateResult_Operation
- func (m *UpdateResult) GetPath() *Path
- func (m *UpdateResult) GetTimestamp() int64
- func (*UpdateResult) ProtoMessage()
- func (m *UpdateResult) Reset()
- func (m *UpdateResult) String() string
- type UpdateResult_Operation
- type Value
Constants ¶
This section is empty.
Variables ¶
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: "github.com/openconfig/reference/rpc/gnmi/gnmi.proto", }
var Encoding_name = map[int32]string{
0: "JSON",
1: "BYTES",
2: "PROTO",
3: "ASCII",
4: "JSON_IETF",
}
var Encoding_value = map[string]int32{
"JSON": 0,
"BYTES": 1,
"PROTO": 2,
"ASCII": 3,
"JSON_IETF": 4,
}
var GetRequest_DataType_name = map[int32]string{
0: "ALL",
1: "CONFIG",
2: "STATE",
3: "OPERATIONAL",
}
var GetRequest_DataType_value = map[string]int32{
"ALL": 0,
"CONFIG": 1,
"STATE": 2,
"OPERATIONAL": 3,
}
var SubscriptionList_Mode_name = map[int32]string{
0: "STREAM",
1: "ONCE",
2: "POLL",
}
var SubscriptionList_Mode_value = map[string]int32{
"STREAM": 0,
"ONCE": 1,
"POLL": 2,
}
var SubscriptionMode_name = map[int32]string{
0: "TARGET_DEFINED",
1: "ON_CHANGE",
2: "SAMPLE",
}
var SubscriptionMode_value = map[string]int32{
"TARGET_DEFINED": 0,
"ON_CHANGE": 1,
"SAMPLE": 2,
}
var UpdateResult_Operation_name = map[int32]string{
0: "INVALID",
1: "DELETE",
2: "REPLACE",
3: "UPDATE",
}
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) ProtoMessage ¶
func (*Alias) ProtoMessage()
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) ProtoMessage ¶
func (*AliasList) ProtoMessage()
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 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
func (Encoding) EnumDescriptor ¶
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 used by the target to return errors to the client. Reference: gNMI Specification Section 2.5
func (*Error) Descriptor ¶
func (*Error) GetData ¶
func (m *Error) GetData() *google_protobuf.Any
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
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) GetOrganization ¶
func (*ModelData) GetVersion ¶
func (*ModelData) ProtoMessage ¶
func (*ModelData) ProtoMessage()
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 { Element []string `protobuf:"bytes,1,rep,name=element" json:"element,omitempty"` Origin string `protobuf:"bytes,2,opt,name=origin" json:"origin,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) GetElement ¶
func (*Path) ProtoMessage ¶
func (*Path) ProtoMessage()
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) ProtoMessage ¶
func (*Poll) ProtoMessage()
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 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"` }
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. 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) 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). The error field is used to report errors that occur during creation of a subscription. 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"` }
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) GetMode ¶
func (m *SubscriptionList) GetMode() SubscriptionList_Mode
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) 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 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"` }
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) ProtoMessage ¶
func (*Update) ProtoMessage()
type UpdateResult ¶
type UpdateResult struct { 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 (m *UpdateResult) GetOp() UpdateResult_Operation
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. Reference: gNMI Specification Section 2.2.3.
func (*Value) Descriptor ¶
func (*Value) ProtoMessage ¶
func (*Value) ProtoMessage()