proto

package
v0.10.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	// Types that are valid to be assigned to Value:
	//	*Attribute_FloatVal
	//	*Attribute_IntVal
	//	*Attribute_StringVal
	//	*Attribute_BoolVal
	Value isAttribute_Value `protobuf_oneof:"value"`
	// unit gives the unit type: MHz, MB, etc.
	Unit                 string   `protobuf:"bytes,5,opt,name=unit,proto3" json:"unit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Attribute is used to describe the value of an attribute, optionally specifying units

func (*Attribute) Descriptor

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

func (*Attribute) GetBoolVal

func (m *Attribute) GetBoolVal() bool

func (*Attribute) GetFloatVal

func (m *Attribute) GetFloatVal() float64

func (*Attribute) GetIntVal

func (m *Attribute) GetIntVal() int64

func (*Attribute) GetStringVal

func (m *Attribute) GetStringVal() string

func (*Attribute) GetUnit

func (m *Attribute) GetUnit() string

func (*Attribute) GetValue

func (m *Attribute) GetValue() isAttribute_Value

func (*Attribute) ProtoMessage

func (*Attribute) ProtoMessage()

func (*Attribute) Reset

func (m *Attribute) Reset()

func (*Attribute) String

func (m *Attribute) String() string

func (*Attribute) XXX_DiscardUnknown

func (m *Attribute) XXX_DiscardUnknown()

func (*Attribute) XXX_Marshal

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

func (*Attribute) XXX_Merge

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

func (*Attribute) XXX_OneofFuncs

func (*Attribute) 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 (*Attribute) XXX_Size

func (m *Attribute) XXX_Size() int

func (*Attribute) XXX_Unmarshal

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

type Attribute_BoolVal

type Attribute_BoolVal struct {
	BoolVal bool `protobuf:"varint,4,opt,name=bool_val,json=boolVal,proto3,oneof"`
}

type Attribute_FloatVal

type Attribute_FloatVal struct {
	FloatVal float64 `protobuf:"fixed64,1,opt,name=float_val,json=floatVal,proto3,oneof"`
}

type Attribute_IntVal

type Attribute_IntVal struct {
	IntVal int64 `protobuf:"varint,2,opt,name=int_val,json=intVal,proto3,oneof"`
}

type Attribute_StringVal

type Attribute_StringVal struct {
	StringVal string `protobuf:"bytes,3,opt,name=string_val,json=stringVal,proto3,oneof"`
}

type RecoverableError

type RecoverableError struct {
	Recoverable          bool     `protobuf:"varint,1,opt,name=recoverable,proto3" json:"recoverable,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

RecoverableError is used with a grpc Status to indicate if the error is one which is recoverable and can be reattempted by the client.

func (*RecoverableError) Descriptor

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

func (*RecoverableError) GetRecoverable

func (m *RecoverableError) GetRecoverable() bool

func (*RecoverableError) ProtoMessage

func (*RecoverableError) ProtoMessage()

func (*RecoverableError) Reset

func (m *RecoverableError) Reset()

func (*RecoverableError) String

func (m *RecoverableError) String() string

func (*RecoverableError) XXX_DiscardUnknown

func (m *RecoverableError) XXX_DiscardUnknown()

func (*RecoverableError) XXX_Marshal

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

func (*RecoverableError) XXX_Merge

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

func (*RecoverableError) XXX_Size

func (m *RecoverableError) XXX_Size() int

func (*RecoverableError) XXX_Unmarshal

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

type StatObject

type StatObject struct {
	// nested is a mapping of object name to a nested stats object.
	Nested map[string]*StatObject `` /* 153-byte string literal not displayed */
	// attributes is a mapping of statistic name to its value.
	Attributes           map[string]*StatValue `` /* 161-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
	XXX_unrecognized     []byte                `json:"-"`
	XXX_sizecache        int32                 `json:"-"`
}

StatObject is a collection of statistics either exposed at the top level or via nested StatObjects.

func (*StatObject) Descriptor

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

func (*StatObject) GetAttributes

func (m *StatObject) GetAttributes() map[string]*StatValue

func (*StatObject) GetNested

func (m *StatObject) GetNested() map[string]*StatObject

func (*StatObject) ProtoMessage

func (*StatObject) ProtoMessage()

func (*StatObject) Reset

func (m *StatObject) Reset()

func (*StatObject) String

func (m *StatObject) String() string

func (*StatObject) XXX_DiscardUnknown

func (m *StatObject) XXX_DiscardUnknown()

func (*StatObject) XXX_Marshal

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

func (*StatObject) XXX_Merge

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

func (*StatObject) XXX_Size

func (m *StatObject) XXX_Size() int

func (*StatObject) XXX_Unmarshal

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

type StatValue

type StatValue struct {
	// float_numerator_val exposes a floating point value. If denominator
	// is set it is assumed to be a fractional value, otherwise it is a
	// scalar.
	FloatNumeratorVal   *wrappers.DoubleValue `protobuf:"bytes,1,opt,name=float_numerator_val,json=floatNumeratorVal,proto3" json:"float_numerator_val,omitempty"`
	FloatDenominatorVal *wrappers.DoubleValue `protobuf:"bytes,2,opt,name=float_denominator_val,json=floatDenominatorVal,proto3" json:"float_denominator_val,omitempty"`
	// int_numerator_val exposes a int value. If denominator
	// is set it is assumed to be a fractional value, otherwise it is a
	// scalar.
	IntNumeratorVal   *wrappers.Int64Value `protobuf:"bytes,3,opt,name=int_numerator_val,json=intNumeratorVal,proto3" json:"int_numerator_val,omitempty"`
	IntDenominatorVal *wrappers.Int64Value `protobuf:"bytes,4,opt,name=int_denominator_val,json=intDenominatorVal,proto3" json:"int_denominator_val,omitempty"`
	// string_val exposes a string value. These are likely annotations.
	StringVal *wrappers.StringValue `protobuf:"bytes,5,opt,name=string_val,json=stringVal,proto3" json:"string_val,omitempty"`
	// bool_val exposes a boolean statistic.
	BoolVal *wrappers.BoolValue `protobuf:"bytes,6,opt,name=bool_val,json=boolVal,proto3" json:"bool_val,omitempty"`
	// unit gives the unit type: °F, %, MHz, MB, etc.
	Unit string `protobuf:"bytes,7,opt,name=unit,proto3" json:"unit,omitempty"`
	// desc provides a human readable description of the statistic.
	Desc                 string   `protobuf:"bytes,8,opt,name=desc,proto3" json:"desc,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

StatValue exposes the values of a particular statistic. The value may be of type double, integer, string or boolean. Numeric types can be exposed as a single value or as a fraction.

func (*StatValue) Descriptor

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

func (*StatValue) GetBoolVal

func (m *StatValue) GetBoolVal() *wrappers.BoolValue

func (*StatValue) GetDesc

func (m *StatValue) GetDesc() string

func (*StatValue) GetFloatDenominatorVal

func (m *StatValue) GetFloatDenominatorVal() *wrappers.DoubleValue

func (*StatValue) GetFloatNumeratorVal

func (m *StatValue) GetFloatNumeratorVal() *wrappers.DoubleValue

func (*StatValue) GetIntDenominatorVal

func (m *StatValue) GetIntDenominatorVal() *wrappers.Int64Value

func (*StatValue) GetIntNumeratorVal

func (m *StatValue) GetIntNumeratorVal() *wrappers.Int64Value

func (*StatValue) GetStringVal

func (m *StatValue) GetStringVal() *wrappers.StringValue

func (*StatValue) GetUnit

func (m *StatValue) GetUnit() string

func (*StatValue) ProtoMessage

func (*StatValue) ProtoMessage()

func (*StatValue) Reset

func (m *StatValue) Reset()

func (*StatValue) String

func (m *StatValue) String() string

func (*StatValue) XXX_DiscardUnknown

func (m *StatValue) XXX_DiscardUnknown()

func (*StatValue) XXX_Marshal

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

func (*StatValue) XXX_Merge

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

func (*StatValue) XXX_Size

func (m *StatValue) XXX_Size() int

func (*StatValue) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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