Documentation ¶
Index ¶
- func ProtoToString(p *oproto.StreamVariable) string
- type Variable
- func (v *Variable) AsProto() (p *oproto.StreamVariable)
- func (v *Variable) Match(match *Variable) bool
- func (v *Variable) ParseFromProto(p *oproto.StreamVariable) error
- func (v *Variable) ParseFromString(textvar string) error
- func (v *Variable) String() string
- func (v *Variable) TimestampInsideRange(timestamp uint64) bool
- func (v *Variable) ToProto(p *oproto.StreamVariable)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtoToString ¶
func ProtoToString(p *oproto.StreamVariable) string
Types ¶
type Variable ¶
type Variable struct { Variable string Labels map[string]string MinTimestamp int64 MaxTimestamp int64 }
Variable represents a variable name with all labels.
func NewFromProto ¶
func NewFromProto(p *oproto.StreamVariable) *Variable
NewFromProto creates a new Variable from the supplied protobuf.
func NewFromString ¶
NewFromString creates a new Variable from the supplied string.
func (*Variable) AsProto ¶
func (v *Variable) AsProto() (p *oproto.StreamVariable)
AsProto returns the Variable encoded as a new StreamVariable protobuf.
func (*Variable) Match ¶
Match checks that the supplied variable matches this one, using the matching rules defined above.
func (*Variable) ParseFromProto ¶
func (v *Variable) ParseFromProto(p *oproto.StreamVariable) error
ParseFromProto extracts the details from a protobuf.
func (*Variable) ParseFromString ¶
ParseFromString extracts the variable name and all labels from a string.
func (*Variable) String ¶
String returns the complete variable as a string, including all labels correctly quoted.
func (*Variable) TimestampInsideRange ¶
func (*Variable) ToProto ¶
func (v *Variable) ToProto(p *oproto.StreamVariable)
AsProto encodes the Variable into an existing protobuf.
Click to show internal directories.
Click to hide internal directories.