gnmi_fake

package
v0.0.0-...-cb4d464 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config_ClientType_name = map[int32]string{
	0: "GRPC",
	1: "STUBBY",
	2: "GRPC_GNMI",
	3: "GRPC_GNMI_PROD",
}
View Source
var Config_ClientType_value = map[string]int32{
	"GRPC":           0,
	"STUBBY":         1,
	"GRPC_GNMI":      2,
	"GRPC_GNMI_PROD": 3,
}
View Source
var State_name = map[int32]string{
	0: "STOPPED",
	1: "INIT",
	2: "RUNNING",
}
View Source
var State_value = map[string]int32{
	"STOPPED": 0,
	"INIT":    1,
	"RUNNING": 2,
}

Functions

This section is empty.

Types

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 int64 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// A global random seed used in generating subsequent values. Set to have
	// reproducible results.
	Seed int64 `protobuf:"varint,6,opt,name=seed,proto3" json:"seed,omitempty"` // Deprecated: Do not use.
	// 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.
	Values []*Value `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"` // Deprecated: Do not use.
	// 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 valid to be assigned to Generator:
	//	*Config_Custom
	//	*Config_Random
	//	*Config_Fixed
	Generator            isConfig_Generator `protobuf_oneof:"generator"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

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

func (*Config) Descriptor

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

func (*Config) GetCert

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

func (*Config) GetClientType

func (m *Config) GetClientType() Config_ClientType

func (*Config) GetCredentials

func (m *Config) GetCredentials() *Credentials

func (*Config) GetCustom

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

func (*Config) GetDisableEof

func (m *Config) GetDisableEof() bool

func (*Config) GetDisableSync

func (m *Config) GetDisableSync() bool

func (*Config) GetEnableDelay

func (m *Config) GetEnableDelay() bool

func (*Config) GetFixed

func (m *Config) GetFixed() *FixedGenerator

func (*Config) GetGenerator

func (m *Config) GetGenerator() isConfig_Generator

func (*Config) GetPort

func (m *Config) GetPort() int64

func (*Config) GetRandom

func (m *Config) GetRandom() *RandomGenerator

func (*Config) GetSeed deprecated

func (m *Config) GetSeed() int64

Deprecated: Do not use.

func (*Config) GetTarget

func (m *Config) GetTarget() string

func (*Config) GetValues deprecated

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

Deprecated: Do not use.

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (dst *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_OneofFuncs

func (*Config) 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.

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

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) EnumDescriptor

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

func (Config_ClientType) String

func (x Config_ClientType) String() string

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"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

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

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

func (*Configuration) GetConfig

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

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) Reset

func (m *Configuration) Reset()

func (*Configuration) String

func (m *Configuration) String() string

func (*Configuration) XXX_DiscardUnknown

func (m *Configuration) XXX_DiscardUnknown()

func (*Configuration) XXX_Marshal

func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Configuration) XXX_Merge

func (dst *Configuration) XXX_Merge(src proto.Message)

func (*Configuration) XXX_Size

func (m *Configuration) XXX_Size() int

func (*Configuration) XXX_Unmarshal

func (m *Configuration) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Credentials) Descriptor

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

func (*Credentials) GetPassword

func (m *Credentials) GetPassword() string

func (*Credentials) GetUsername

func (m *Credentials) GetUsername() string

func (*Credentials) ProtoMessage

func (*Credentials) ProtoMessage()

func (*Credentials) Reset

func (m *Credentials) Reset()

func (*Credentials) String

func (m *Credentials) String() string

func (*Credentials) XXX_DiscardUnknown

func (m *Credentials) XXX_DiscardUnknown()

func (*Credentials) XXX_Marshal

func (m *Credentials) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Credentials) XXX_Merge

func (dst *Credentials) XXX_Merge(src proto.Message)

func (*Credentials) XXX_Size

func (m *Credentials) XXX_Size() int

func (*Credentials) XXX_Unmarshal

func (m *Credentials) XXX_Unmarshal(b []byte) error

type DeleteValue

type DeleteValue struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*DeleteValue) Descriptor

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

func (*DeleteValue) ProtoMessage

func (*DeleteValue) ProtoMessage()

func (*DeleteValue) Reset

func (m *DeleteValue) Reset()

func (*DeleteValue) String

func (m *DeleteValue) String() string

func (*DeleteValue) XXX_DiscardUnknown

func (m *DeleteValue) XXX_DiscardUnknown()

func (*DeleteValue) XXX_Marshal

func (m *DeleteValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteValue) XXX_Merge

func (dst *DeleteValue) XXX_Merge(src proto.Message)

func (*DeleteValue) XXX_Size

func (m *DeleteValue) XXX_Size() int

func (*DeleteValue) XXX_Unmarshal

func (m *DeleteValue) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DoubleList) Descriptor

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

func (*DoubleList) GetOptions

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

func (*DoubleList) GetRandom

func (m *DoubleList) GetRandom() bool

func (*DoubleList) ProtoMessage

func (*DoubleList) ProtoMessage()

func (*DoubleList) Reset

func (m *DoubleList) Reset()

func (*DoubleList) String

func (m *DoubleList) String() string

func (*DoubleList) XXX_DiscardUnknown

func (m *DoubleList) XXX_DiscardUnknown()

func (*DoubleList) XXX_Marshal

func (m *DoubleList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DoubleList) XXX_Merge

func (dst *DoubleList) XXX_Merge(src proto.Message)

func (*DoubleList) XXX_Size

func (m *DoubleList) XXX_Size() int

func (*DoubleList) XXX_Unmarshal

func (m *DoubleList) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DoubleRange) Descriptor

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

func (*DoubleRange) GetDeltaMax

func (m *DoubleRange) GetDeltaMax() float64

func (*DoubleRange) GetDeltaMin

func (m *DoubleRange) GetDeltaMin() float64

func (*DoubleRange) GetMaximum

func (m *DoubleRange) GetMaximum() float64

func (*DoubleRange) GetMinimum

func (m *DoubleRange) GetMinimum() float64

func (*DoubleRange) ProtoMessage

func (*DoubleRange) ProtoMessage()

func (*DoubleRange) Reset

func (m *DoubleRange) Reset()

func (*DoubleRange) String

func (m *DoubleRange) String() string

func (*DoubleRange) XXX_DiscardUnknown

func (m *DoubleRange) XXX_DiscardUnknown()

func (*DoubleRange) XXX_Marshal

func (m *DoubleRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DoubleRange) XXX_Merge

func (dst *DoubleRange) XXX_Merge(src proto.Message)

func (*DoubleRange) XXX_Size

func (m *DoubleRange) XXX_Size() int

func (*DoubleRange) XXX_Unmarshal

func (m *DoubleRange) XXX_Unmarshal(b []byte) error

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 valid to be assigned to Distribution:
	//	*DoubleValue_Range
	//	*DoubleValue_List
	Distribution         isDoubleValue_Distribution `protobuf_oneof:"distribution"`
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

func (*DoubleValue) Descriptor

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

func (*DoubleValue) GetDistribution

func (m *DoubleValue) GetDistribution() isDoubleValue_Distribution

func (*DoubleValue) GetList

func (m *DoubleValue) GetList() *DoubleList

func (*DoubleValue) GetRange

func (m *DoubleValue) GetRange() *DoubleRange

func (*DoubleValue) GetValue

func (m *DoubleValue) GetValue() float64

func (*DoubleValue) ProtoMessage

func (*DoubleValue) ProtoMessage()

func (*DoubleValue) Reset

func (m *DoubleValue) Reset()

func (*DoubleValue) String

func (m *DoubleValue) String() string

func (*DoubleValue) XXX_DiscardUnknown

func (m *DoubleValue) XXX_DiscardUnknown()

func (*DoubleValue) XXX_Marshal

func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DoubleValue) XXX_Merge

func (dst *DoubleValue) XXX_Merge(src proto.Message)

func (*DoubleValue) XXX_OneofFuncs

func (*DoubleValue) 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.

func (*DoubleValue) XXX_Size

func (m *DoubleValue) XXX_Size() int

func (*DoubleValue) XXX_Unmarshal

func (m *DoubleValue) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

func (*FixedGenerator) Descriptor

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

func (*FixedGenerator) GetResponses

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

func (*FixedGenerator) ProtoMessage

func (*FixedGenerator) ProtoMessage()

func (*FixedGenerator) Reset

func (m *FixedGenerator) Reset()

func (*FixedGenerator) String

func (m *FixedGenerator) String() string

func (*FixedGenerator) XXX_DiscardUnknown

func (m *FixedGenerator) XXX_DiscardUnknown()

func (*FixedGenerator) XXX_Marshal

func (m *FixedGenerator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FixedGenerator) XXX_Merge

func (dst *FixedGenerator) XXX_Merge(src proto.Message)

func (*FixedGenerator) XXX_Size

func (m *FixedGenerator) XXX_Size() int

func (*FixedGenerator) XXX_Unmarshal

func (m *FixedGenerator) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*IntList) Descriptor

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

func (*IntList) GetOptions

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

func (*IntList) GetRandom

func (m *IntList) GetRandom() bool

func (*IntList) ProtoMessage

func (*IntList) ProtoMessage()

func (*IntList) Reset

func (m *IntList) Reset()

func (*IntList) String

func (m *IntList) String() string

func (*IntList) XXX_DiscardUnknown

func (m *IntList) XXX_DiscardUnknown()

func (*IntList) XXX_Marshal

func (m *IntList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IntList) XXX_Merge

func (dst *IntList) XXX_Merge(src proto.Message)

func (*IntList) XXX_Size

func (m *IntList) XXX_Size() int

func (*IntList) XXX_Unmarshal

func (m *IntList) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*IntRange) Descriptor

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

func (*IntRange) GetDeltaMax

func (m *IntRange) GetDeltaMax() int64

func (*IntRange) GetDeltaMin

func (m *IntRange) GetDeltaMin() int64

func (*IntRange) GetMaximum

func (m *IntRange) GetMaximum() int64

func (*IntRange) GetMinimum

func (m *IntRange) GetMinimum() int64

func (*IntRange) ProtoMessage

func (*IntRange) ProtoMessage()

func (*IntRange) Reset

func (m *IntRange) Reset()

func (*IntRange) String

func (m *IntRange) String() string

func (*IntRange) XXX_DiscardUnknown

func (m *IntRange) XXX_DiscardUnknown()

func (*IntRange) XXX_Marshal

func (m *IntRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IntRange) XXX_Merge

func (dst *IntRange) XXX_Merge(src proto.Message)

func (*IntRange) XXX_Size

func (m *IntRange) XXX_Size() int

func (*IntRange) XXX_Unmarshal

func (m *IntRange) XXX_Unmarshal(b []byte) error

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 valid to be assigned to Distribution:
	//	*IntValue_Range
	//	*IntValue_List
	Distribution         isIntValue_Distribution `protobuf_oneof:"distribution"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*IntValue) Descriptor

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

func (*IntValue) GetDistribution

func (m *IntValue) GetDistribution() isIntValue_Distribution

func (*IntValue) GetList

func (m *IntValue) GetList() *IntList

func (*IntValue) GetRange

func (m *IntValue) GetRange() *IntRange

func (*IntValue) GetValue

func (m *IntValue) GetValue() int64

func (*IntValue) ProtoMessage

func (*IntValue) ProtoMessage()

func (*IntValue) Reset

func (m *IntValue) Reset()

func (*IntValue) String

func (m *IntValue) String() string

func (*IntValue) XXX_DiscardUnknown

func (m *IntValue) XXX_DiscardUnknown()

func (*IntValue) XXX_Marshal

func (m *IntValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IntValue) XXX_Merge

func (dst *IntValue) XXX_Merge(src proto.Message)

func (*IntValue) XXX_OneofFuncs

func (*IntValue) 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.

func (*IntValue) XXX_Size

func (m *IntValue) XXX_Size() int

func (*IntValue) XXX_Unmarshal

func (m *IntValue) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RandomGenerator) Descriptor

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

func (*RandomGenerator) GetSeed

func (m *RandomGenerator) GetSeed() int64

func (*RandomGenerator) GetValues

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

func (*RandomGenerator) ProtoMessage

func (*RandomGenerator) ProtoMessage()

func (*RandomGenerator) Reset

func (m *RandomGenerator) Reset()

func (*RandomGenerator) String

func (m *RandomGenerator) String() string

func (*RandomGenerator) XXX_DiscardUnknown

func (m *RandomGenerator) XXX_DiscardUnknown()

func (*RandomGenerator) XXX_Marshal

func (m *RandomGenerator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RandomGenerator) XXX_Merge

func (dst *RandomGenerator) XXX_Merge(src proto.Message)

func (*RandomGenerator) XXX_Size

func (m *RandomGenerator) XXX_Size() int

func (*RandomGenerator) XXX_Unmarshal

func (m *RandomGenerator) XXX_Unmarshal(b []byte) error

type State

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

func (State) EnumDescriptor

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

func (State) String

func (x State) String() string

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StringList) Descriptor

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

func (*StringList) GetOptions

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

func (*StringList) GetRandom

func (m *StringList) GetRandom() bool

func (*StringList) ProtoMessage

func (*StringList) ProtoMessage()

func (*StringList) Reset

func (m *StringList) Reset()

func (*StringList) String

func (m *StringList) String() string

func (*StringList) XXX_DiscardUnknown

func (m *StringList) XXX_DiscardUnknown()

func (*StringList) XXX_Marshal

func (m *StringList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StringList) XXX_Merge

func (dst *StringList) XXX_Merge(src proto.Message)

func (*StringList) XXX_Size

func (m *StringList) XXX_Size() int

func (*StringList) XXX_Unmarshal

func (m *StringList) XXX_Unmarshal(b []byte) error

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 valid to be assigned to Distribution:
	//	*StringValue_List
	Distribution         isStringValue_Distribution `protobuf_oneof:"distribution"`
	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
	XXX_unrecognized     []byte                     `json:"-"`
	XXX_sizecache        int32                      `json:"-"`
}

func (*StringValue) Descriptor

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

func (*StringValue) GetDistribution

func (m *StringValue) GetDistribution() isStringValue_Distribution

func (*StringValue) GetList

func (m *StringValue) GetList() *StringList

func (*StringValue) GetValue

func (m *StringValue) GetValue() string

func (*StringValue) ProtoMessage

func (*StringValue) ProtoMessage()

func (*StringValue) Reset

func (m *StringValue) Reset()

func (*StringValue) String

func (m *StringValue) String() string

func (*StringValue) XXX_DiscardUnknown

func (m *StringValue) XXX_DiscardUnknown()

func (*StringValue) XXX_Marshal

func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StringValue) XXX_Merge

func (dst *StringValue) XXX_Merge(src proto.Message)

func (*StringValue) XXX_OneofFuncs

func (*StringValue) 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.

func (*StringValue) XXX_Size

func (m *StringValue) XXX_Size() int

func (*StringValue) XXX_Unmarshal

func (m *StringValue) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Timestamp) Descriptor

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

func (*Timestamp) GetDeltaMax

func (m *Timestamp) GetDeltaMax() int64

func (*Timestamp) GetDeltaMin

func (m *Timestamp) GetDeltaMin() int64

func (*Timestamp) GetTimestamp

func (m *Timestamp) GetTimestamp() int64

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) Reset

func (m *Timestamp) Reset()

func (*Timestamp) String

func (m *Timestamp) String() string

func (*Timestamp) XXX_DiscardUnknown

func (m *Timestamp) XXX_DiscardUnknown()

func (*Timestamp) XXX_Marshal

func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Timestamp) XXX_Merge

func (dst *Timestamp) XXX_Merge(src proto.Message)

func (*Timestamp) XXX_Size

func (m *Timestamp) XXX_Size() int

func (*Timestamp) XXX_Unmarshal

func (m *Timestamp) XXX_Unmarshal(b []byte) error

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 valid to be assigned to Value:
	//	*Value_IntValue
	//	*Value_DoubleValue
	//	*Value_StringValue
	//	*Value_Sync
	//	*Value_Delete
	Value                isValue_Value `protobuf_oneof:"value"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

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

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

func (*Value) GetDelete

func (m *Value) GetDelete() *DeleteValue

func (*Value) GetDoubleValue

func (m *Value) GetDoubleValue() *DoubleValue

func (*Value) GetIntValue

func (m *Value) GetIntValue() *IntValue

func (*Value) GetPath

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

func (*Value) GetRepeat

func (m *Value) GetRepeat() int32

func (*Value) GetSeed

func (m *Value) GetSeed() int64

func (*Value) GetStringValue

func (m *Value) GetStringValue() *StringValue

func (*Value) GetSync

func (m *Value) GetSync() uint64

func (*Value) GetTimestamp

func (m *Value) GetTimestamp() *Timestamp

func (*Value) GetValue

func (m *Value) GetValue() isValue_Value

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) String

func (m *Value) String() string

func (*Value) XXX_DiscardUnknown

func (m *Value) XXX_DiscardUnknown()

func (*Value) XXX_Marshal

func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Value) XXX_Merge

func (dst *Value) XXX_Merge(src proto.Message)

func (*Value) XXX_OneofFuncs

func (*Value) 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.

func (*Value) XXX_Size

func (m *Value) XXX_Size() int

func (*Value) XXX_Unmarshal

func (m *Value) XXX_Unmarshal(b []byte) error

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"`
}

Jump to

Keyboard shortcuts

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