gnmi_ext

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 46

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExtensionID_name = map[int32]string{
		0:   "EID_UNSET",
		999: "EID_EXPERIMENTAL",
	}
	ExtensionID_value = map[string]int32{
		"EID_UNSET":        0,
		"EID_EXPERIMENTAL": 999,
	}
)

Enum value maps for ExtensionID.

View Source
var File_proto_gnmi_ext_gnmi_ext_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Commit added in v0.11.0

type Commit struct {

	// ID is provided by the client during the commit request. During confirm and
	// cancel actions the provided ID should match the ID provided during commit.
	// If ID is not passed in any actions server shall return error.
	// Required.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Types that are assignable to Action:
	//
	//	*Commit_Commit
	//	*Commit_Confirm
	//	*Commit_Cancel
	//	*Commit_SetRollbackDuration
	Action isCommit_Action `protobuf_oneof:"action"`
	// contains filtered or unexported fields
}

Commit confirmed extension allows automated revert of the configuration after certain duration if an explicit confirmation is not issued. It allows explicit cancellation of the commit during the rollback window. There cannot be more than one commit active at a given time. The document about gNMI commit confirmed can be found at https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-commit-confirmed.md

func (*Commit) Descriptor deprecated added in v0.11.0

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

Deprecated: Use Commit.ProtoReflect.Descriptor instead.

func (*Commit) GetAction added in v0.11.0

func (m *Commit) GetAction() isCommit_Action

func (*Commit) GetCancel added in v0.11.0

func (x *Commit) GetCancel() *CommitCancel

func (*Commit) GetCommit added in v0.11.0

func (x *Commit) GetCommit() *CommitRequest

func (*Commit) GetConfirm added in v0.11.0

func (x *Commit) GetConfirm() *CommitConfirm

func (*Commit) GetId added in v0.11.0

func (x *Commit) GetId() string

func (*Commit) GetSetRollbackDuration added in v0.11.0

func (x *Commit) GetSetRollbackDuration() *CommitSetRollbackDuration

func (*Commit) ProtoMessage added in v0.11.0

func (*Commit) ProtoMessage()

func (*Commit) ProtoReflect added in v0.11.0

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

func (*Commit) Reset added in v0.11.0

func (x *Commit) Reset()

func (*Commit) String added in v0.11.0

func (x *Commit) String() string

type CommitCancel added in v0.11.0

type CommitCancel struct {
	// contains filtered or unexported fields
}

CommitCancel is used to cancel an on-going commit. It hold additional parameter requried for cancel action.

func (*CommitCancel) Descriptor deprecated added in v0.11.0

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

Deprecated: Use CommitCancel.ProtoReflect.Descriptor instead.

func (*CommitCancel) ProtoMessage added in v0.11.0

func (*CommitCancel) ProtoMessage()

func (*CommitCancel) ProtoReflect added in v0.11.0

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

func (*CommitCancel) Reset added in v0.11.0

func (x *CommitCancel) Reset()

func (*CommitCancel) String added in v0.11.0

func (x *CommitCancel) String() string

type CommitConfirm added in v0.11.0

type CommitConfirm struct {
	// contains filtered or unexported fields
}

CommitConfirm is used to confirm an on-going commit. It hold additional parameter requried for confirm action.

func (*CommitConfirm) Descriptor deprecated added in v0.11.0

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

Deprecated: Use CommitConfirm.ProtoReflect.Descriptor instead.

func (*CommitConfirm) ProtoMessage added in v0.11.0

func (*CommitConfirm) ProtoMessage()

func (*CommitConfirm) ProtoReflect added in v0.11.0

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

func (*CommitConfirm) Reset added in v0.11.0

func (x *CommitConfirm) Reset()

func (*CommitConfirm) String added in v0.11.0

func (x *CommitConfirm) String() string

type CommitRequest added in v0.11.0

type CommitRequest struct {

	// Maximum duration to wait for a confirmaton before reverting the commit.
	RollbackDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=rollback_duration,json=rollbackDuration,proto3" json:"rollback_duration,omitempty"`
	// contains filtered or unexported fields
}

CommitRequest is used to create a new confirmed commit. It hold additional parameter requried for commit action.

func (*CommitRequest) Descriptor deprecated added in v0.11.0

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

Deprecated: Use CommitRequest.ProtoReflect.Descriptor instead.

func (*CommitRequest) GetRollbackDuration added in v0.11.0

func (x *CommitRequest) GetRollbackDuration() *durationpb.Duration

func (*CommitRequest) ProtoMessage added in v0.11.0

func (*CommitRequest) ProtoMessage()

func (*CommitRequest) ProtoReflect added in v0.11.0

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

func (*CommitRequest) Reset added in v0.11.0

func (x *CommitRequest) Reset()

func (*CommitRequest) String added in v0.11.0

func (x *CommitRequest) String() string

type CommitSetRollbackDuration added in v0.11.0

type CommitSetRollbackDuration struct {

	// Maximum duration to wait for a confirmaton before reverting the commit.
	RollbackDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=rollback_duration,json=rollbackDuration,proto3" json:"rollback_duration,omitempty"`
	// contains filtered or unexported fields
}

CommitSetRollbackDuration is used to set the existing rollback duration value of an on-going commit to a new desired value.

func (*CommitSetRollbackDuration) Descriptor deprecated added in v0.11.0

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

Deprecated: Use CommitSetRollbackDuration.ProtoReflect.Descriptor instead.

func (*CommitSetRollbackDuration) GetRollbackDuration added in v0.11.0

func (x *CommitSetRollbackDuration) GetRollbackDuration() *durationpb.Duration

func (*CommitSetRollbackDuration) ProtoMessage added in v0.11.0

func (*CommitSetRollbackDuration) ProtoMessage()

func (*CommitSetRollbackDuration) ProtoReflect added in v0.11.0

func (*CommitSetRollbackDuration) Reset added in v0.11.0

func (x *CommitSetRollbackDuration) Reset()

func (*CommitSetRollbackDuration) String added in v0.11.0

func (x *CommitSetRollbackDuration) String() string

type Commit_Cancel added in v0.11.0

type Commit_Cancel struct {
	// cancel action will cancel an on-going commit, the ID provided during
	// cancel should match the on-going commit ID.
	Cancel *CommitCancel `protobuf:"bytes,4,opt,name=cancel,proto3,oneof"`
}

type Commit_Commit added in v0.11.0

type Commit_Commit struct {
	// commit action creates a new commit. If a commit is on-going, server
	// returns error.
	Commit *CommitRequest `protobuf:"bytes,2,opt,name=commit,proto3,oneof"`
}

type Commit_Confirm added in v0.11.0

type Commit_Confirm struct {
	// confirm action will confirm an on-going commit, the ID provided during
	// confirm should match the on-going commit ID.
	Confirm *CommitConfirm `protobuf:"bytes,3,opt,name=confirm,proto3,oneof"`
}

type Commit_SetRollbackDuration added in v0.11.0

type Commit_SetRollbackDuration struct {
	// set rollback duration action sets the rollback duration of an on-going commit
	// to a new value.
	// The ID provided with the Commit message should match the on-going commit ID.
	SetRollbackDuration *CommitSetRollbackDuration `protobuf:"bytes,5,opt,name=set_rollback_duration,json=setRollbackDuration,proto3,oneof"`
}

type Depth added in v0.11.0

type Depth struct {

	// The level of the subtree to be returned in the response.
	// Value of 0 means no depth limit and behaves the same as if the extension
	// was not specified.
	// Value of 1 means only the specified path and its direct children will be
	// returned.
	Level uint32 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"`
	// contains filtered or unexported fields
}

Depth allows clients to specify the depth of the subtree to be returned in the response. The depth is specified as the number of levels below the specified path. The depth is applied to all paths in the Get or Subscribe request. The document about gNMI depth can be found at https://github.com/openconfig/reference/tree/master/rpc/gnmi/gnmi-depth.md

func (*Depth) Descriptor deprecated added in v0.11.0

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

Deprecated: Use Depth.ProtoReflect.Descriptor instead.

func (*Depth) GetLevel added in v0.11.0

func (x *Depth) GetLevel() uint32

func (*Depth) ProtoMessage added in v0.11.0

func (*Depth) ProtoMessage()

func (*Depth) ProtoReflect added in v0.11.0

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

func (*Depth) Reset added in v0.11.0

func (x *Depth) Reset()

func (*Depth) String added in v0.11.0

func (x *Depth) String() string

type Extension

type Extension struct {

	// Types that are assignable to Ext:
	//
	//	*Extension_RegisteredExt
	//	*Extension_MasterArbitration
	//	*Extension_History
	//	*Extension_Commit
	//	*Extension_Depth
	Ext isExtension_Ext `protobuf_oneof:"ext"`
	// contains filtered or unexported fields
}

The Extension message contains a single gNMI extension.

func (*Extension) Descriptor deprecated

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

Deprecated: Use Extension.ProtoReflect.Descriptor instead.

func (*Extension) GetCommit added in v0.11.0

func (x *Extension) GetCommit() *Commit

func (*Extension) GetDepth added in v0.11.0

func (x *Extension) GetDepth() *Depth

func (*Extension) GetExt

func (m *Extension) GetExt() isExtension_Ext

func (*Extension) GetHistory

func (x *Extension) GetHistory() *History

func (*Extension) GetMasterArbitration

func (x *Extension) GetMasterArbitration() *MasterArbitration

func (*Extension) GetRegisteredExt

func (x *Extension) GetRegisteredExt() *RegisteredExtension

func (*Extension) ProtoMessage

func (*Extension) ProtoMessage()

func (*Extension) ProtoReflect

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

func (*Extension) Reset

func (x *Extension) Reset()

func (*Extension) String

func (x *Extension) String() string

type ExtensionID

type ExtensionID int32

RegisteredExtension is an enumeration acting as a registry for extensions defined by external sources.

const (
	ExtensionID_EID_UNSET ExtensionID = 0
	// An experimental extension that may be used during prototyping of a new
	// extension.
	ExtensionID_EID_EXPERIMENTAL ExtensionID = 999
)

func (ExtensionID) Descriptor

func (ExtensionID) Enum

func (x ExtensionID) Enum() *ExtensionID

func (ExtensionID) EnumDescriptor deprecated

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

Deprecated: Use ExtensionID.Descriptor instead.

func (ExtensionID) Number

func (x ExtensionID) Number() protoreflect.EnumNumber

func (ExtensionID) String

func (x ExtensionID) String() string

func (ExtensionID) Type

type Extension_Commit added in v0.11.0

type Extension_Commit struct {
	Commit *Commit `protobuf:"bytes,4,opt,name=commit,proto3,oneof"` // Commit confirmed extension.
}

type Extension_Depth added in v0.11.0

type Extension_Depth struct {
	Depth *Depth `protobuf:"bytes,5,opt,name=depth,proto3,oneof"` // Depth extension.
}

type Extension_History

type Extension_History struct {
	History *History `protobuf:"bytes,3,opt,name=history,proto3,oneof"` // History extension.
}

type Extension_MasterArbitration

type Extension_MasterArbitration struct {
	// Well known extensions.
	MasterArbitration *MasterArbitration `protobuf:"bytes,2,opt,name=master_arbitration,json=masterArbitration,proto3,oneof"` // Master arbitration extension.
}

type Extension_RegisteredExt

type Extension_RegisteredExt struct {
	RegisteredExt *RegisteredExtension `protobuf:"bytes,1,opt,name=registered_ext,json=registeredExt,proto3,oneof"` // A registered extension.
}

type History

type History struct {

	// Types that are assignable to Request:
	//
	//	*History_SnapshotTime
	//	*History_Range
	Request isHistory_Request `protobuf_oneof:"request"`
	// contains filtered or unexported fields
}

The History extension allows clients to request historical data. Its spec can be found at https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-history.md

func (*History) Descriptor deprecated

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

Deprecated: Use History.ProtoReflect.Descriptor instead.

func (*History) GetRange

func (x *History) GetRange() *TimeRange

func (*History) GetRequest

func (m *History) GetRequest() isHistory_Request

func (*History) GetSnapshotTime

func (x *History) GetSnapshotTime() int64

func (*History) ProtoMessage

func (*History) ProtoMessage()

func (*History) ProtoReflect

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

func (*History) Reset

func (x *History) Reset()

func (*History) String

func (x *History) String() string

type History_Range

type History_Range struct {
	Range *TimeRange `protobuf:"bytes,2,opt,name=range,proto3,oneof"`
}

type History_SnapshotTime

type History_SnapshotTime struct {
	SnapshotTime int64 `protobuf:"varint,1,opt,name=snapshot_time,json=snapshotTime,proto3,oneof"` // Nanoseconds since the epoch
}

type MasterArbitration

type MasterArbitration struct {
	Role       *Role    `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	ElectionId *Uint128 `protobuf:"bytes,2,opt,name=election_id,json=electionId,proto3" json:"election_id,omitempty"`
	// contains filtered or unexported fields
}

MasterArbitration is used to select the master among multiple gNMI clients with the same Roles. The client with the largest election_id is honored as the master. The document about gNMI master arbitration can be found at https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-master-arbitration.md

func (*MasterArbitration) Descriptor deprecated

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

Deprecated: Use MasterArbitration.ProtoReflect.Descriptor instead.

func (*MasterArbitration) GetElectionId

func (x *MasterArbitration) GetElectionId() *Uint128

func (*MasterArbitration) GetRole

func (x *MasterArbitration) GetRole() *Role

func (*MasterArbitration) ProtoMessage

func (*MasterArbitration) ProtoMessage()

func (*MasterArbitration) ProtoReflect

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

func (*MasterArbitration) Reset

func (x *MasterArbitration) Reset()

func (*MasterArbitration) String

func (x *MasterArbitration) String() string

type RegisteredExtension

type RegisteredExtension struct {
	Id  ExtensionID `protobuf:"varint,1,opt,name=id,proto3,enum=gnmi_ext.ExtensionID" json:"id,omitempty"` // The unique ID assigned to this extension.
	Msg []byte      `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`                          // The binary-marshalled protobuf extension payload.
	// contains filtered or unexported fields
}

The RegisteredExtension message defines an extension which is defined outside of this file.

func (*RegisteredExtension) Descriptor deprecated

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

Deprecated: Use RegisteredExtension.ProtoReflect.Descriptor instead.

func (*RegisteredExtension) GetId

func (x *RegisteredExtension) GetId() ExtensionID

func (*RegisteredExtension) GetMsg

func (x *RegisteredExtension) GetMsg() []byte

func (*RegisteredExtension) ProtoMessage

func (*RegisteredExtension) ProtoMessage()

func (*RegisteredExtension) ProtoReflect

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

func (*RegisteredExtension) Reset

func (x *RegisteredExtension) Reset()

func (*RegisteredExtension) String

func (x *RegisteredExtension) String() string

type Role

type Role struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

There can be one master for each role. The role is identified by its id.

func (*Role) Descriptor deprecated

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

Deprecated: Use Role.ProtoReflect.Descriptor instead.

func (*Role) GetId

func (x *Role) GetId() string

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) ProtoReflect

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

func (*Role) Reset

func (x *Role) Reset()

func (*Role) String

func (x *Role) String() string

type TimeRange

type TimeRange struct {
	Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` // Nanoseconds since the epoch
	End   int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`     // Nanoseconds since the epoch
	// contains filtered or unexported fields
}

func (*TimeRange) Descriptor deprecated

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

Deprecated: Use TimeRange.ProtoReflect.Descriptor instead.

func (*TimeRange) GetEnd

func (x *TimeRange) GetEnd() int64

func (*TimeRange) GetStart

func (x *TimeRange) GetStart() int64

func (*TimeRange) ProtoMessage

func (*TimeRange) ProtoMessage()

func (*TimeRange) ProtoReflect

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

func (*TimeRange) Reset

func (x *TimeRange) Reset()

func (*TimeRange) String

func (x *TimeRange) String() string

type Uint128

type Uint128 struct {
	High uint64 `protobuf:"varint,1,opt,name=high,proto3" json:"high,omitempty"`
	Low  uint64 `protobuf:"varint,2,opt,name=low,proto3" json:"low,omitempty"`
	// contains filtered or unexported fields
}

Representation of unsigned 128-bit integer.

func (*Uint128) Descriptor deprecated

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

Deprecated: Use Uint128.ProtoReflect.Descriptor instead.

func (*Uint128) GetHigh

func (x *Uint128) GetHigh() uint64

func (*Uint128) GetLow

func (x *Uint128) GetLow() uint64

func (*Uint128) ProtoMessage

func (*Uint128) ProtoMessage()

func (*Uint128) ProtoReflect

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

func (*Uint128) Reset

func (x *Uint128) Reset()

func (*Uint128) String

func (x *Uint128) String() string

Jump to

Keyboard shortcuts

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