gnmi_fake

package
Version: v0.0.0-...-aed1ee4 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 (
	Config_ClientType_name = map[int32]string{
		0: "GRPC",
		1: "STUBBY",
		2: "GRPC_GNMI",
		3: "GRPC_GNMI_PROD",
	}
	Config_ClientType_value = map[string]int32{
		"GRPC":           0,
		"STUBBY":         1,
		"GRPC_GNMI":      2,
		"GRPC_GNMI_PROD": 3,
	}
)

Enum value maps for Config_ClientType.

View Source
var File_testing_fake_proto_fake_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BoolList

type BoolList struct {

	// The set of values which can be used.
	Options []bool `protobuf:"varint,1,rep,packed,name=options,proto3" json:"options,omitempty"`
	// Set to true to randomize selection of value from options. If false, the
	// values are cycled in order, starting at index 0.
	Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"`
	// contains filtered or unexported fields
}

func (*BoolList) Descriptor deprecated

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

Deprecated: Use BoolList.ProtoReflect.Descriptor instead.

func (*BoolList) GetOptions

func (x *BoolList) GetOptions() []bool

func (*BoolList) GetRandom

func (x *BoolList) GetRandom() bool

func (*BoolList) ProtoMessage

func (*BoolList) ProtoMessage()

func (*BoolList) ProtoReflect

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

func (*BoolList) Reset

func (x *BoolList) Reset()

func (*BoolList) String

func (x *BoolList) String() string

type BoolValue

type BoolValue struct {

	// If distribution is BoolList, value is only used to hold the value as it
	// mutates.
	// If no distribution is set, value is used as it mutates, i.e. constant
	// update.
	Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// Types that are assignable to Distribution:
	//	*BoolValue_List
	Distribution isBoolValue_Distribution `protobuf_oneof:"distribution"`
	// contains filtered or unexported fields
}

func (*BoolValue) Descriptor deprecated

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

Deprecated: Use BoolValue.ProtoReflect.Descriptor instead.

func (*BoolValue) GetDistribution

func (m *BoolValue) GetDistribution() isBoolValue_Distribution

func (*BoolValue) GetList

func (x *BoolValue) GetList() *BoolList

func (*BoolValue) GetValue

func (x *BoolValue) GetValue() bool

func (*BoolValue) ProtoMessage

func (*BoolValue) ProtoMessage()

func (*BoolValue) ProtoReflect

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

func (*BoolValue) Reset

func (x *BoolValue) Reset()

func (*BoolValue) String

func (x *BoolValue) String() string

type BoolValue_List

type BoolValue_List struct {
	List *BoolList `protobuf:"bytes,2,opt,name=list,proto3,oneof"`
}

type Config

type Config struct {

	// The target for which the fake will publish values for.
	Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
	// Port for the agent to listen on. If 0 or unset the agent will pick a port
	// for this agent.
	Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// A global random seed used in generating subsequent values. Set to have
	// reproducible results.
	//
	// Deprecated: Do not use.
	Seed int64 `protobuf:"varint,6,opt,name=seed,proto3" json:"seed,omitempty"`
	// The list of values generated.  Each value will contain its corresponding
	// target as the first string in the event.GetValue().path meaning that it is
	// possible to generate streams that will be rejected by the cache for testing
	// purposes.
	//
	// Deprecated: Do not use.
	Values []*Value `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
	// Setting disable sync will keep the configured client from autogenerating a
	// sync message. This allows negative testing on sync handling.
	DisableSync bool `protobuf:"varint,4,opt,name=disable_sync,json=disableSync,proto3" json:"disable_sync,omitempty"`
	// Type of client to fake either Stubby or GRPC based fake.
	ClientType Config_ClientType `protobuf:"varint,5,opt,name=client_type,json=clientType,proto3,enum=gnmi.fake.Config_ClientType" json:"client_type,omitempty"`
	// Disable EOF will hold open the subscription and not automagically close
	// the stream once the value queue is empty.
	DisableEof bool `protobuf:"varint,7,opt,name=disable_eof,json=disableEof,proto3" json:"disable_eof,omitempty"`
	// Per RPC credentials for the agent. If not set no per RPC auth will be used.
	Credentials *Credentials `protobuf:"bytes,8,opt,name=credentials,proto3" json:"credentials,omitempty"`
	// TLS cert for use on the agent. If not set the transport will not be TLS.
	Cert []byte `protobuf:"bytes,9,opt,name=cert,proto3" json:"cert,omitempty"`
	// Honor the delay between events in the generated value streams. Default will
	// play events as fast as the can be streamed.
	EnableDelay bool `protobuf:"varint,10,opt,name=enable_delay,json=enableDelay,proto3" json:"enable_delay,omitempty"`
	// Generator for value series for the target.
	//
	// Types that are assignable to Generator:
	//	*Config_Custom
	//	*Config_Random
	//	*Config_Fixed
	Generator isConfig_Generator `protobuf_oneof:"generator"`
	// contains filtered or unexported fields
}

Config is a collection of values that together represent the update streams for one or more fake devices.

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetCert

func (x *Config) GetCert() []byte

func (*Config) GetClientType

func (x *Config) GetClientType() Config_ClientType

func (*Config) GetCredentials

func (x *Config) GetCredentials() *Credentials

func (*Config) GetCustom

func (x *Config) GetCustom() *any.Any

func (*Config) GetDisableEof

func (x *Config) GetDisableEof() bool

func (*Config) GetDisableSync

func (x *Config) GetDisableSync() bool

func (*Config) GetEnableDelay

func (x *Config) GetEnableDelay() bool

func (*Config) GetFixed

func (x *Config) GetFixed() *FixedGenerator

func (*Config) GetGenerator

func (m *Config) GetGenerator() isConfig_Generator

func (*Config) GetPort

func (x *Config) GetPort() int32

func (*Config) GetRandom

func (x *Config) GetRandom() *RandomGenerator

func (*Config) GetSeed deprecated

func (x *Config) GetSeed() int64

Deprecated: Do not use.

func (*Config) GetTarget

func (x *Config) GetTarget() string

func (*Config) GetValues deprecated

func (x *Config) GetValues() []*Value

Deprecated: Do not use.

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Config_ClientType

type Config_ClientType int32
const (
	Config_GRPC           Config_ClientType = 0
	Config_STUBBY         Config_ClientType = 1
	Config_GRPC_GNMI      Config_ClientType = 2
	Config_GRPC_GNMI_PROD Config_ClientType = 3
)

func (Config_ClientType) Descriptor

func (Config_ClientType) Enum

func (Config_ClientType) EnumDescriptor deprecated

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

Deprecated: Use Config_ClientType.Descriptor instead.

func (Config_ClientType) Number

func (Config_ClientType) String

func (x Config_ClientType) String() string

func (Config_ClientType) Type

type Config_Custom

type Config_Custom struct {
	Custom *any.Any `protobuf:"bytes,100,opt,name=custom,proto3,oneof"`
}

type Config_Fixed

type Config_Fixed struct {
	Fixed *FixedGenerator `protobuf:"bytes,102,opt,name=fixed,proto3,oneof"`
}

type Config_Random

type Config_Random struct {
	Random *RandomGenerator `protobuf:"bytes,101,opt,name=random,proto3,oneof"`
}

type Configuration

type Configuration struct {

	// Repeated list of targets to emulate.
	Config []*Config `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

Configuration is used to store all agent configuration for the fake agent server. Each config describes a single agent hosted on the server.

func (*Configuration) Descriptor deprecated

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

Deprecated: Use Configuration.ProtoReflect.Descriptor instead.

func (*Configuration) GetConfig

func (x *Configuration) GetConfig() []*Config

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) ProtoReflect

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

func (*Configuration) Reset

func (x *Configuration) Reset()

func (*Configuration) String

func (x *Configuration) String() string

type Credentials

type Credentials struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*Credentials) Descriptor deprecated

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

Deprecated: Use Credentials.ProtoReflect.Descriptor instead.

func (*Credentials) GetPassword

func (x *Credentials) GetPassword() string

func (*Credentials) GetUsername

func (x *Credentials) GetUsername() string

func (*Credentials) ProtoMessage

func (*Credentials) ProtoMessage()

func (*Credentials) ProtoReflect

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

func (*Credentials) Reset

func (x *Credentials) Reset()

func (*Credentials) String

func (x *Credentials) String() string

type DeleteValue

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

Delete will cause the value to be deleted at the Value's path.

func (*DeleteValue) Descriptor deprecated

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

Deprecated: Use DeleteValue.ProtoReflect.Descriptor instead.

func (*DeleteValue) ProtoMessage

func (*DeleteValue) ProtoMessage()

func (*DeleteValue) ProtoReflect

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

func (*DeleteValue) Reset

func (x *DeleteValue) Reset()

func (*DeleteValue) String

func (x *DeleteValue) String() string

type DoubleList

type DoubleList struct {

	// The set of values which can be used.
	Options []float64 `protobuf:"fixed64,1,rep,packed,name=options,proto3" json:"options,omitempty"`
	// Set to true to randomize selection of value from options. If false, the
	// values are cycled in order.
	Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"`
	// contains filtered or unexported fields
}

func (*DoubleList) Descriptor deprecated

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

Deprecated: Use DoubleList.ProtoReflect.Descriptor instead.

func (*DoubleList) GetOptions

func (x *DoubleList) GetOptions() []float64

func (*DoubleList) GetRandom

func (x *DoubleList) GetRandom() bool

func (*DoubleList) ProtoMessage

func (*DoubleList) ProtoMessage()

func (*DoubleList) ProtoReflect

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

func (*DoubleList) Reset

func (x *DoubleList) Reset()

func (*DoubleList) String

func (x *DoubleList) String() string

type DoubleRange

type DoubleRange struct {

	// The range of the value allowed.
	Minimum float64 `protobuf:"fixed64,1,opt,name=minimum,proto3" json:"minimum,omitempty"`
	Maximum float64 `protobuf:"fixed64,2,opt,name=maximum,proto3" json:"maximum,omitempty"`
	// If set, the value is cumulative and the subsequent value is value + delta
	// where delta is randomly chosen between delta_min and delta_max. The range
	// minimum and maximum are still respected. If not set subsequent value is a
	// value randomly chosen between minimum and maximum.
	DeltaMin float64 `protobuf:"fixed64,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"`
	DeltaMax float64 `protobuf:"fixed64,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"`
	// contains filtered or unexported fields
}

func (*DoubleRange) Descriptor deprecated

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

Deprecated: Use DoubleRange.ProtoReflect.Descriptor instead.

func (*DoubleRange) GetDeltaMax

func (x *DoubleRange) GetDeltaMax() float64

func (*DoubleRange) GetDeltaMin

func (x *DoubleRange) GetDeltaMin() float64

func (*DoubleRange) GetMaximum

func (x *DoubleRange) GetMaximum() float64

func (*DoubleRange) GetMinimum

func (x *DoubleRange) GetMinimum() float64

func (*DoubleRange) ProtoMessage

func (*DoubleRange) ProtoMessage()

func (*DoubleRange) ProtoReflect

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

func (*DoubleRange) Reset

func (x *DoubleRange) Reset()

func (*DoubleRange) String

func (x *DoubleRange) String() string

type DoubleValue

type DoubleValue struct {

	// If distribution is DoubleRange, value is used as the initial value
	// inside [minimum, maximum] and hold the value as it mutates.
	// If distribution is DoubleList, value is only used to hold the value as it
	// mutates.
	// If no distribution is set, value is used as it mutates, i.e. constant
	// update.
	Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
	// Types that are assignable to Distribution:
	//	*DoubleValue_Range
	//	*DoubleValue_List
	Distribution isDoubleValue_Distribution `protobuf_oneof:"distribution"`
	// contains filtered or unexported fields
}

func (*DoubleValue) Descriptor deprecated

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

Deprecated: Use DoubleValue.ProtoReflect.Descriptor instead.

func (*DoubleValue) GetDistribution

func (m *DoubleValue) GetDistribution() isDoubleValue_Distribution

func (*DoubleValue) GetList

func (x *DoubleValue) GetList() *DoubleList

func (*DoubleValue) GetRange

func (x *DoubleValue) GetRange() *DoubleRange

func (*DoubleValue) GetValue

func (x *DoubleValue) GetValue() float64

func (*DoubleValue) ProtoMessage

func (*DoubleValue) ProtoMessage()

func (*DoubleValue) ProtoReflect

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

func (*DoubleValue) Reset

func (x *DoubleValue) Reset()

func (*DoubleValue) String

func (x *DoubleValue) String() string

type DoubleValue_List

type DoubleValue_List struct {
	List *DoubleList `protobuf:"bytes,3,opt,name=list,proto3,oneof"`
}

type DoubleValue_Range

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

type FixedGenerator

type FixedGenerator struct {
	Responses []*gnmi.SubscribeResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
	// contains filtered or unexported fields
}

func (*FixedGenerator) Descriptor deprecated

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

Deprecated: Use FixedGenerator.ProtoReflect.Descriptor instead.

func (*FixedGenerator) GetResponses

func (x *FixedGenerator) GetResponses() []*gnmi.SubscribeResponse

func (*FixedGenerator) ProtoMessage

func (*FixedGenerator) ProtoMessage()

func (*FixedGenerator) ProtoReflect

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

func (*FixedGenerator) Reset

func (x *FixedGenerator) Reset()

func (*FixedGenerator) String

func (x *FixedGenerator) String() string

type IntList

type IntList struct {

	// The set of values which can be used.
	Options []int64 `protobuf:"varint,1,rep,packed,name=options,proto3" json:"options,omitempty"`
	// Set to true to randomize selection of value from options. If false, the
	// values are cycled in order, starting at index 0.
	Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"`
	// contains filtered or unexported fields
}

func (*IntList) Descriptor deprecated

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

Deprecated: Use IntList.ProtoReflect.Descriptor instead.

func (*IntList) GetOptions

func (x *IntList) GetOptions() []int64

func (*IntList) GetRandom

func (x *IntList) GetRandom() bool

func (*IntList) ProtoMessage

func (*IntList) ProtoMessage()

func (*IntList) ProtoReflect

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

func (*IntList) Reset

func (x *IntList) Reset()

func (*IntList) String

func (x *IntList) String() string

type IntRange

type IntRange struct {

	// The range of the value allowed.
	Minimum int64 `protobuf:"varint,1,opt,name=minimum,proto3" json:"minimum,omitempty"`
	Maximum int64 `protobuf:"varint,2,opt,name=maximum,proto3" json:"maximum,omitempty"`
	// If set, the value is cumulative and the subsequent value is value + delta
	// where delta is randomly chosen between delta_min and delta_max.  The range
	// minimum and maximum are still respected and values will saturate at the
	// boundaries if they are exceeded. If not set subsequent value is a value
	// randomly chosen between minimum and maximum.
	DeltaMin int64 `protobuf:"varint,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"`
	DeltaMax int64 `protobuf:"varint,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"`
	// contains filtered or unexported fields
}

func (*IntRange) Descriptor deprecated

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

Deprecated: Use IntRange.ProtoReflect.Descriptor instead.

func (*IntRange) GetDeltaMax

func (x *IntRange) GetDeltaMax() int64

func (*IntRange) GetDeltaMin

func (x *IntRange) GetDeltaMin() int64

func (*IntRange) GetMaximum

func (x *IntRange) GetMaximum() int64

func (*IntRange) GetMinimum

func (x *IntRange) GetMinimum() int64

func (*IntRange) ProtoMessage

func (*IntRange) ProtoMessage()

func (*IntRange) ProtoReflect

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

func (*IntRange) Reset

func (x *IntRange) Reset()

func (*IntRange) String

func (x *IntRange) String() string

type IntValue

type IntValue struct {

	// If distribution is IntRange, value is used as the initial value
	// inside [minimum, maximum] and hold the value as it mutates.
	// If distribution is IntList, value is only used to hold the value as it
	// mutates.
	// If no distribution is set, value is used as it mutates, i.e. constant
	// update.
	Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// Types that are assignable to Distribution:
	//	*IntValue_Range
	//	*IntValue_List
	Distribution isIntValue_Distribution `protobuf_oneof:"distribution"`
	// contains filtered or unexported fields
}

func (*IntValue) Descriptor deprecated

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

Deprecated: Use IntValue.ProtoReflect.Descriptor instead.

func (*IntValue) GetDistribution

func (m *IntValue) GetDistribution() isIntValue_Distribution

func (*IntValue) GetList

func (x *IntValue) GetList() *IntList

func (*IntValue) GetRange

func (x *IntValue) GetRange() *IntRange

func (*IntValue) GetValue

func (x *IntValue) GetValue() int64

func (*IntValue) ProtoMessage

func (*IntValue) ProtoMessage()

func (*IntValue) ProtoReflect

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

func (*IntValue) Reset

func (x *IntValue) Reset()

func (*IntValue) String

func (x *IntValue) String() string

type IntValue_List

type IntValue_List struct {
	List *IntList `protobuf:"bytes,3,opt,name=list,proto3,oneof"`
}

type IntValue_Range

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

type RandomGenerator

type RandomGenerator struct {
	Seed   int64    `protobuf:"varint,1,opt,name=seed,proto3" json:"seed,omitempty"`
	Values []*Value `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*RandomGenerator) Descriptor deprecated

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

Deprecated: Use RandomGenerator.ProtoReflect.Descriptor instead.

func (*RandomGenerator) GetSeed

func (x *RandomGenerator) GetSeed() int64

func (*RandomGenerator) GetValues

func (x *RandomGenerator) GetValues() []*Value

func (*RandomGenerator) ProtoMessage

func (*RandomGenerator) ProtoMessage()

func (*RandomGenerator) ProtoReflect

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

func (*RandomGenerator) Reset

func (x *RandomGenerator) Reset()

func (*RandomGenerator) String

func (x *RandomGenerator) 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 StringList

type StringList struct {

	// The set of strings which can be used.
	Options []string `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"`
	// Set to true to randomize selection of value from options. If false, the
	// values are cycled in order, starting at index 0.
	Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"`
	// contains filtered or unexported fields
}

func (*StringList) Descriptor deprecated

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

Deprecated: Use StringList.ProtoReflect.Descriptor instead.

func (*StringList) GetOptions

func (x *StringList) GetOptions() []string

func (*StringList) GetRandom

func (x *StringList) GetRandom() bool

func (*StringList) ProtoMessage

func (*StringList) ProtoMessage()

func (*StringList) ProtoReflect

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

func (*StringList) Reset

func (x *StringList) Reset()

func (*StringList) String

func (x *StringList) String() string

type StringValue

type StringValue struct {

	// If distribution is StringList, value is used to hold the value as it
	// mutates.
	// If no distribution is set, value is used as it mutates, i.e. constant
	// update.
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// Types that are assignable to Distribution:
	//	*StringValue_List
	Distribution isStringValue_Distribution `protobuf_oneof:"distribution"`
	// contains filtered or unexported fields
}

func (*StringValue) Descriptor deprecated

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

Deprecated: Use StringValue.ProtoReflect.Descriptor instead.

func (*StringValue) GetDistribution

func (m *StringValue) GetDistribution() isStringValue_Distribution

func (*StringValue) GetList

func (x *StringValue) GetList() *StringList

func (*StringValue) GetValue

func (x *StringValue) GetValue() string

func (*StringValue) ProtoMessage

func (*StringValue) ProtoMessage()

func (*StringValue) ProtoReflect

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

func (*StringValue) Reset

func (x *StringValue) Reset()

func (*StringValue) String

func (x *StringValue) String() string

type StringValue_List

type StringValue_List struct {
	List *StringList `protobuf:"bytes,2,opt,name=list,proto3,oneof"`
}

type Timestamp

type Timestamp struct {

	// Initial timestamp for the corresponding value, nanoseconds since epoch.
	// This value need have no relation to absolute real-time as the stream of
	// of updates is generated without regard to the real clock and can be run
	// repeatably at any time if the seed is set in the corresponding Value.
	Timestamp int64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// These values will vary the change in the timestamp for subsequent outputs
	// by a value between delta_min and delta_max.  Set to the same value to force
	// a set periodic interval.
	DeltaMin int64 `protobuf:"varint,2,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"`
	DeltaMax int64 `protobuf:"varint,3,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"`
	// contains filtered or unexported fields
}

func (*Timestamp) Descriptor deprecated

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

Deprecated: Use Timestamp.ProtoReflect.Descriptor instead.

func (*Timestamp) GetDeltaMax

func (x *Timestamp) GetDeltaMax() int64

func (*Timestamp) GetDeltaMin

func (x *Timestamp) GetDeltaMin() int64

func (*Timestamp) GetTimestamp

func (x *Timestamp) GetTimestamp() int64

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) ProtoReflect

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

func (*Timestamp) Reset

func (x *Timestamp) Reset()

func (*Timestamp) String

func (x *Timestamp) String() string

type UintList

type UintList struct {

	// The set of values which can be used.
	Options []uint64 `protobuf:"varint,1,rep,packed,name=options,proto3" json:"options,omitempty"`
	// Set to true to randomize selection of value from options. If false, the
	// values are cycled in order, starting at index 0.
	Random bool `protobuf:"varint,2,opt,name=random,proto3" json:"random,omitempty"`
	// contains filtered or unexported fields
}

func (*UintList) Descriptor deprecated

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

Deprecated: Use UintList.ProtoReflect.Descriptor instead.

func (*UintList) GetOptions

func (x *UintList) GetOptions() []uint64

func (*UintList) GetRandom

func (x *UintList) GetRandom() bool

func (*UintList) ProtoMessage

func (*UintList) ProtoMessage()

func (*UintList) ProtoReflect

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

func (*UintList) Reset

func (x *UintList) Reset()

func (*UintList) String

func (x *UintList) String() string

type UintRange

type UintRange struct {

	// The range of the value allowed.
	Minimum uint64 `protobuf:"varint,1,opt,name=minimum,proto3" json:"minimum,omitempty"`
	Maximum uint64 `protobuf:"varint,2,opt,name=maximum,proto3" json:"maximum,omitempty"`
	// If set, the value is cumulative and the subsequent value is value + delta
	// where delta is randomly chosen between delta_min and delta_max.  The range
	// minimum and maximum are still respected and values will saturate at the
	// boundaries if they are exceeded. If not set subsequent value is a value
	// randomly chosen between minimum and maximum.
	DeltaMin int64 `protobuf:"varint,3,opt,name=delta_min,json=deltaMin,proto3" json:"delta_min,omitempty"`
	DeltaMax int64 `protobuf:"varint,4,opt,name=delta_max,json=deltaMax,proto3" json:"delta_max,omitempty"`
	// contains filtered or unexported fields
}

func (*UintRange) Descriptor deprecated

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

Deprecated: Use UintRange.ProtoReflect.Descriptor instead.

func (*UintRange) GetDeltaMax

func (x *UintRange) GetDeltaMax() int64

func (*UintRange) GetDeltaMin

func (x *UintRange) GetDeltaMin() int64

func (*UintRange) GetMaximum

func (x *UintRange) GetMaximum() uint64

func (*UintRange) GetMinimum

func (x *UintRange) GetMinimum() uint64

func (*UintRange) ProtoMessage

func (*UintRange) ProtoMessage()

func (*UintRange) ProtoReflect

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

func (*UintRange) Reset

func (x *UintRange) Reset()

func (*UintRange) String

func (x *UintRange) String() string

type UintValue

type UintValue struct {

	// If distribution is UintRange, value is used as the initial value
	// inside [minimum, maximum] and hold the value as it mutates.
	// If distribution is UintList, value is only used to hold the value as it
	// mutates.
	// If no distribution is set, value is used as it mutates, i.e. constant
	// update.
	Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// Types that are assignable to Distribution:
	//	*UintValue_Range
	//	*UintValue_List
	Distribution isUintValue_Distribution `protobuf_oneof:"distribution"`
	// contains filtered or unexported fields
}

func (*UintValue) Descriptor deprecated

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

Deprecated: Use UintValue.ProtoReflect.Descriptor instead.

func (*UintValue) GetDistribution

func (m *UintValue) GetDistribution() isUintValue_Distribution

func (*UintValue) GetList

func (x *UintValue) GetList() *UintList

func (*UintValue) GetRange

func (x *UintValue) GetRange() *UintRange

func (*UintValue) GetValue

func (x *UintValue) GetValue() uint64

func (*UintValue) ProtoMessage

func (*UintValue) ProtoMessage()

func (*UintValue) ProtoReflect

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

func (*UintValue) Reset

func (x *UintValue) Reset()

func (*UintValue) String

func (x *UintValue) String() string

type UintValue_List

type UintValue_List struct {
	List *UintList `protobuf:"bytes,3,opt,name=list,proto3,oneof"`
}

type UintValue_Range

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

type Value

type Value struct {

	// The device specific, or OpenConfig path corresponding to a value.
	Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
	// The initial timestamp and configuration on how the timestamp will change
	// for subsequent values. If timestamp is not set the default will assume to
	// be the current system time.
	Timestamp *Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// If set, repeat indicates that the value should be repeated this many times,
	// otherwise it is repeated indefinitely.
	Repeat int32 `protobuf:"varint,6,opt,name=repeat,proto3" json:"repeat,omitempty"`
	// A local random seed used in generating subsequent values for this path. If
	// not set, will share the global random source with seed defined in Config.
	Seed int64 `protobuf:"varint,7,opt,name=seed,proto3" json:"seed,omitempty"`
	// The initial value of the chosen type including configuration on how the
	// value will mutate for subsequent updates.
	//
	// Types that are assignable to Value:
	//	*Value_IntValue
	//	*Value_DoubleValue
	//	*Value_StringValue
	//	*Value_Sync
	//	*Value_Delete
	//	*Value_BoolValue
	//	*Value_UintValue
	Value isValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

Value is the main message that will trigger a stream of updates for a given path. A file containing a list of values can be used to simulate a network device for integration tests.

func (*Value) Descriptor deprecated

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

Deprecated: Use Value.ProtoReflect.Descriptor instead.

func (*Value) GetBoolValue

func (x *Value) GetBoolValue() *BoolValue

func (*Value) GetDelete

func (x *Value) GetDelete() *DeleteValue

func (*Value) GetDoubleValue

func (x *Value) GetDoubleValue() *DoubleValue

func (*Value) GetIntValue

func (x *Value) GetIntValue() *IntValue

func (*Value) GetPath

func (x *Value) GetPath() []string

func (*Value) GetRepeat

func (x *Value) GetRepeat() int32

func (*Value) GetSeed

func (x *Value) GetSeed() int64

func (*Value) GetStringValue

func (x *Value) GetStringValue() *StringValue

func (*Value) GetSync

func (x *Value) GetSync() uint64

func (*Value) GetTimestamp

func (x *Value) GetTimestamp() *Timestamp

func (*Value) GetUintValue

func (x *Value) GetUintValue() *UintValue

func (*Value) GetValue

func (m *Value) GetValue() isValue_Value

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

type Value_BoolValue

type Value_BoolValue struct {
	BoolValue *BoolValue `protobuf:"bytes,105,opt,name=bool_value,json=boolValue,proto3,oneof"`
}

type Value_Delete

type Value_Delete struct {
	Delete *DeleteValue `protobuf:"bytes,104,opt,name=delete,proto3,oneof"`
}

type Value_DoubleValue

type Value_DoubleValue struct {
	DoubleValue *DoubleValue `protobuf:"bytes,101,opt,name=double_value,json=doubleValue,proto3,oneof"`
}

type Value_IntValue

type Value_IntValue struct {
	IntValue *IntValue `protobuf:"bytes,100,opt,name=int_value,json=intValue,proto3,oneof"`
}

type Value_StringValue

type Value_StringValue struct {
	StringValue *StringValue `protobuf:"bytes,102,opt,name=string_value,json=stringValue,proto3,oneof"`
}

type Value_Sync

type Value_Sync struct {
	Sync uint64 `protobuf:"varint,103,opt,name=sync,proto3,oneof"`
}

type Value_UintValue

type Value_UintValue struct {
	UintValue *UintValue `protobuf:"bytes,106,opt,name=uint_value,json=uintValue,proto3,oneof"`
}

Source Files

Jump to

Keyboard shortcuts

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