gnmi_sonic

package
v0.0.0-...-1510907 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package gnmi_sonic is a generated protocol buffer package.

It is generated from these files:

dial_out.proto
sonic_internal.proto
sonic.proto

It has these top-level messages:

PublishResponse
Value
SupportedBundleVersions
BundleVersion

Index

Constants

View Source
const BUNDLE_VERSION_EXT = 700
View Source
const SUPPORTED_VERSIONS_EXT = 701

Variables

View Source
var (
	State_name = map[int32]string{
		0: "STOPPED",
		1: "INIT",
		2: "RUNNING",
	}
	State_value = map[string]int32{
		"STOPPED": 0,
		"INIT":    1,
		"RUNNING": 2,
	}
)

Enum value maps for State.

View Source
var File_sonic_internal_proto protoreflect.FileDescriptor
View Source
var Target_name = map[int32]string{
	0: "APPL_DB",
	1: "ASIC_DB",
	2: "COUNTERS_DB",
	4: "CONFIG_DB",
	5: "PFC_WD_DB",

	6:   "STATE_DB",
	100: "OTHERS",
}
View Source
var Target_value = map[string]int32{
	"APPL_DB":         0,
	"ASIC_DB":         1,
	"COUNTERS_DB":     2,
	"CONFIG_DB":       4,
	"PFC_WD_DB":       5,
	"FLEX_COUNTER_DB": 5,
	"STATE_DB":        6,
	"OTHERS":          100,
}

Functions

func RegisterGNMIDialOutServer

func RegisterGNMIDialOutServer(s *grpc.Server, srv GNMIDialOutServer)

Types

type BundleVersion

type BundleVersion struct {
	Version string `protobuf:"bytes,1,opt,name=version" json:"version,omitempty"`
}

func (*BundleVersion) Descriptor

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

func (*BundleVersion) GetVersion

func (m *BundleVersion) GetVersion() string

func (*BundleVersion) ProtoMessage

func (*BundleVersion) ProtoMessage()

func (*BundleVersion) Reset

func (m *BundleVersion) Reset()

func (*BundleVersion) String

func (m *BundleVersion) String() string

type GNMIDialOutClient

type GNMIDialOutClient interface {
	// Publish allows the target to send telemetry updates (in the form of
	// SubscribeResponse messaages, which have the same semantics as in the
	// gNMI Subscribe RPC, to a client. The client may optionally return the
	// PublishResponse message in response to the dial-out connection from the
	// target as acknowledgement to the SubscribeResponse message
	//
	// The configuration of subscriptions associated with the publish RPC may
	// be through the OpenConfig telemetry configuration and operational state
	// model:
	// https://github.com/openconfig/public/blob/master/release/models/telemetry/openconfig-telemetry.yang
	Publish(ctx context.Context, opts ...grpc.CallOption) (GNMIDialOut_PublishClient, error)
}

func NewGNMIDialOutClient

func NewGNMIDialOutClient(cc *grpc.ClientConn) GNMIDialOutClient

type GNMIDialOutServer

type GNMIDialOutServer interface {
	// Publish allows the target to send telemetry updates (in the form of
	// SubscribeResponse messaages, which have the same semantics as in the
	// gNMI Subscribe RPC, to a client. The client may optionally return the
	// PublishResponse message in response to the dial-out connection from the
	// target as acknowledgement to the SubscribeResponse message
	//
	// The configuration of subscriptions associated with the publish RPC may
	// be through the OpenConfig telemetry configuration and operational state
	// model:
	// https://github.com/openconfig/public/blob/master/release/models/telemetry/openconfig-telemetry.yang
	Publish(GNMIDialOut_PublishServer) error
}

type GNMIDialOut_PublishClient

type GNMIDialOut_PublishClient interface {
	Send(*gnmi.SubscribeResponse) error
	Recv() (*PublishResponse, error)
	grpc.ClientStream
}

type GNMIDialOut_PublishServer

type GNMIDialOut_PublishServer interface {
	Send(*PublishResponse) error
	Recv() (*gnmi.SubscribeResponse, error)
	grpc.ServerStream
}

type PublishResponse

type PublishResponse struct {
	Timestamp int64      `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"`
	Prefix    *gnmi.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"`
	Path  []*gnmi.Path `protobuf:"bytes,4,rep,name=path" json:"path,omitempty"`
}

func (*PublishResponse) Descriptor

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

func (*PublishResponse) GetAlias

func (m *PublishResponse) GetAlias() string

func (*PublishResponse) GetPath

func (m *PublishResponse) GetPath() []*gnmi.Path

func (*PublishResponse) GetPrefix

func (m *PublishResponse) GetPrefix() *gnmi.Path

func (*PublishResponse) GetTimestamp

func (m *PublishResponse) GetTimestamp() int64

func (*PublishResponse) ProtoMessage

func (*PublishResponse) ProtoMessage()

func (*PublishResponse) Reset

func (m *PublishResponse) Reset()

func (*PublishResponse) String

func (m *PublishResponse) String() string

type State

type State int32
const (
	State_STOPPED State = 0
	State_INIT    State = 1
	State_RUNNING State = 2
)

func (State) Descriptor

func (State) Descriptor() protoreflect.EnumDescriptor

func (State) Enum

func (x State) Enum() *State

func (State) EnumDescriptor deprecated

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

Deprecated: Use State.Descriptor instead.

func (State) Number

func (x State) Number() protoreflect.EnumNumber

func (State) String

func (x State) String() string

func (State) Type

func (State) Type() protoreflect.EnumType

type SupportedBundleVersions

type SupportedBundleVersions struct {
	BundleVersion string `protobuf:"bytes,1,opt,name=bundle_version,json=bundleVersion" json:"bundle_version,omitempty"`
	BaseVersion   string `protobuf:"bytes,2,opt,name=base_version,json=baseVersion" json:"base_version,omitempty"`
}

func (*SupportedBundleVersions) Descriptor

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

func (*SupportedBundleVersions) GetBaseVersion

func (m *SupportedBundleVersions) GetBaseVersion() string

func (*SupportedBundleVersions) GetBundleVersion

func (m *SupportedBundleVersions) GetBundleVersion() string

func (*SupportedBundleVersions) ProtoMessage

func (*SupportedBundleVersions) ProtoMessage()

func (*SupportedBundleVersions) Reset

func (m *SupportedBundleVersions) Reset()

func (*SupportedBundleVersions) String

func (m *SupportedBundleVersions) String() string

type Target

type Target int32

target - the name of the target for which the path is a member. Only set in prefix for a path.

const (
	Target_APPL_DB     Target = 0
	Target_ASIC_DB     Target = 1
	Target_COUNTERS_DB Target = 2
	Target_CONFIG_DB   Target = 4
	// PFC_WD_DB shares the the same db number with FLEX_COUNTER_DB
	Target_PFC_WD_DB       Target = 5
	Target_FLEX_COUNTER_DB Target = 5
	Target_STATE_DB        Target = 6
	// For none-DB data
	Target_OTHERS Target = 100
)

func (Target) EnumDescriptor

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

func (Target) String

func (x Target) String() string

type Value

type Value struct {

	// prefix used with path
	Prefix *gnmi.Path `protobuf:"bytes,1,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// The device specific, or path corresponding to a value.
	Path *gnmi.Path `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	// timestamp for the corresponding value, nanoseconds since epoch.
	// If timestamp is not set the default will assume to
	// be the current system time.
	Timestamp int64            `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Val       *gnmi.TypedValue `protobuf:"bytes,4,opt,name=val,proto3" json:"val,omitempty"`
	// Indicate target has sent all values associated with the subscription
	// at least once.
	SyncResponse bool `protobuf:"varint,5,opt,name=sync_response,json=syncResponse,proto3" json:"sync_response,omitempty"`
	// fatal error happened.
	Fatal string `protobuf:"bytes,6,opt,name=fatal,proto3" json:"fatal,omitempty"`
	// Notification to be used in place of 1-4 if present
	Notification *gnmi.Notification `protobuf:"bytes,7,opt,name=notification,proto3" json:"notification,omitempty"`
	// contains filtered or unexported fields
}

Value is the message that reprents a stream of updates for a given path, used internally.

func (*Value) Descriptor deprecated

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

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetFatal

func (x *Value) GetFatal() string

func (*Value) GetNotification

func (x *Value) GetNotification() *gnmi.Notification

func (*Value) GetPath

func (x *Value) GetPath() *gnmi.Path

func (*Value) GetPrefix

func (x *Value) GetPrefix() *gnmi.Path

func (*Value) GetSyncResponse

func (x *Value) GetSyncResponse() bool

func (*Value) GetTimestamp

func (x *Value) GetTimestamp() int64

func (*Value) GetVal

func (x *Value) GetVal() *gnmi.TypedValue

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) ProtoReflect

func (x *Value) ProtoReflect() protoreflect.Message

func (*Value) Reset

func (x *Value) Reset()

func (*Value) String

func (x *Value) String() string

Directories

Path Synopsis
jwt

Jump to

Keyboard shortcuts

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