value

package
v2.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BooleanValue

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

BooleanValue represents a boolean value.

func NewRawBooleanValue

func NewRawBooleanValue(t int64, v bool) BooleanValue

NewRawBooleanValue returns a new boolean value.

func (BooleanValue) RawValue

func (v BooleanValue) RawValue() bool

func (BooleanValue) Size

func (v BooleanValue) Size() int

Size returns the number of bytes necessary to represent the value and its timestamp.

func (BooleanValue) String

func (v BooleanValue) String() string

String returns the string representation of the value and its timestamp.

func (BooleanValue) UnixNano

func (v BooleanValue) UnixNano() int64

UnixNano returns the timestamp of the value in nanoseconds since unix epoch.

func (BooleanValue) Value

func (v BooleanValue) Value() interface{}

Value returns the underlying boolean value.

type EmptyValue

type EmptyValue struct{}

EmptyValue is used when there is no appropriate other value.

func (EmptyValue) Size

func (e EmptyValue) Size() int

Size returns 0.

func (EmptyValue) String

func (e EmptyValue) String() string

String returns the empty string.

func (EmptyValue) UnixNano

func (e EmptyValue) UnixNano() int64

UnixNano returns tsdb.EOF.

func (EmptyValue) Value

func (e EmptyValue) Value() interface{}

Value returns nil.

type FloatValue

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

FloatValue represents a float64 value.

func NewRawFloatValue

func NewRawFloatValue(t int64, v float64) FloatValue

NewRawFloatValue returns a new float value.

func (FloatValue) RawValue

func (v FloatValue) RawValue() float64

func (FloatValue) Size

func (v FloatValue) Size() int

Size returns the number of bytes necessary to represent the value and its timestamp.

func (FloatValue) String

func (v FloatValue) String() string

String returns the string representation of the value and its timestamp.

func (FloatValue) UnixNano

func (v FloatValue) UnixNano() int64

UnixNano returns the timestamp of the value.

func (FloatValue) Value

func (v FloatValue) Value() interface{}

Value returns the underlying float64 value.

type IntegerValue

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

IntegerValue represents an int64 value.

func NewRawIntegerValue

func NewRawIntegerValue(t int64, v int64) IntegerValue

NewRawIntegerValue returns a new integer value.

func (IntegerValue) RawValue

func (v IntegerValue) RawValue() int64

func (IntegerValue) Size

func (v IntegerValue) Size() int

Size returns the number of bytes necessary to represent the value and its timestamp.

func (IntegerValue) String

func (v IntegerValue) String() string

String returns the string representation of the value and its timestamp.

func (IntegerValue) UnixNano

func (v IntegerValue) UnixNano() int64

UnixNano returns the timestamp of the value.

func (IntegerValue) Value

func (v IntegerValue) Value() interface{}

Value returns the underlying int64 value.

type StringValue

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

StringValue represents a string value.

func NewRawStringValue

func NewRawStringValue(t int64, v string) StringValue

NewRawStringValue returns a new string value.

func (StringValue) RawValue

func (v StringValue) RawValue() string

func (StringValue) Size

func (v StringValue) Size() int

Size returns the number of bytes necessary to represent the value and its timestamp.

func (StringValue) String

func (v StringValue) String() string

String returns the string representation of the value and its timestamp.

func (StringValue) UnixNano

func (v StringValue) UnixNano() int64

UnixNano returns the timestamp of the value.

func (StringValue) Value

func (v StringValue) Value() interface{}

Value returns the underlying string value.

type UnsignedValue

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

UnsignedValue represents an int64 value.

func NewRawUnsignedValue

func NewRawUnsignedValue(t int64, v uint64) UnsignedValue

NewRawUnsignedValue returns a new unsigned integer value.

func (UnsignedValue) RawValue

func (v UnsignedValue) RawValue() uint64

func (UnsignedValue) Size

func (v UnsignedValue) Size() int

Size returns the number of bytes necessary to represent the value and its timestamp.

func (UnsignedValue) String

func (v UnsignedValue) String() string

String returns the string representation of the value and its timestamp.

func (UnsignedValue) UnixNano

func (v UnsignedValue) UnixNano() int64

UnixNano returns the timestamp of the value.

func (UnsignedValue) Value

func (v UnsignedValue) Value() interface{}

Value returns the underlying int64 value.

type Value

type Value interface {
	// UnixNano returns the timestamp of the value in nanoseconds since unix epoch.
	UnixNano() int64

	// Value returns the underlying value.
	Value() interface{}

	// Size returns the number of bytes necessary to represent the value and its timestamp.
	Size() int

	// String returns the string representation of the value and its timestamp.
	String() string
	// contains filtered or unexported methods
}

Value represents a TSM-encoded value.

func NewBooleanValue

func NewBooleanValue(t int64, v bool) Value

NewBooleanValue returns a new boolean value.

func NewFloatValue

func NewFloatValue(t int64, v float64) Value

NewFloatValue returns a new float value.

func NewIntegerValue

func NewIntegerValue(t int64, v int64) Value

NewIntegerValue returns a new integer value.

func NewStringValue

func NewStringValue(t int64, v string) Value

NewStringValue returns a new string value.

func NewUnsignedValue

func NewUnsignedValue(t int64, v uint64) Value

NewUnsignedValue returns a new unsigned integer value.

func NewValue

func NewValue(t int64, value interface{}) Value

NewValue returns a new Value with the underlying type dependent on value.

Jump to

Keyboard shortcuts

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