Versions in this module Expand all Collapse all v2 v2.4.0 Feb 27, 2026 Changes in this version + var ErrValueOutOfRange = errors.New("line-protocol value out of range") + type DecodeError struct + Column int + Err error + Line int64 + func (e *DecodeError) Error() string + func (e *DecodeError) Unwrap() error + type Decoder struct + func NewDecoder(r io.Reader) *Decoder + func NewDecoderWithBytes(buf []byte) *Decoder + func (d *Decoder) Err() error + func (d *Decoder) Measurement() ([]byte, error) + func (d *Decoder) Next() bool + func (d *Decoder) NextField() (key []byte, val Value, err error) + func (d *Decoder) NextFieldBytes() (key []byte, kind ValueKind, value []byte, err error) + func (d *Decoder) NextTag() (key, value []byte, err error) + func (d *Decoder) SetMaxBufferSize(n int) + func (d *Decoder) Time(prec Precision, defaultTime time.Time) (time.Time, error) + func (d *Decoder) TimeBytes() ([]byte, error) + type EncodeError struct + Err error + Line int + func (e *EncodeError) Error() string + func (e *EncodeError) Unwrap() error + type Encoder struct + func (e *Encoder) AddField(key string, value Value) + func (e *Encoder) AddFieldRaw(key []byte, value Value) + func (e *Encoder) AddTag(key, value string) + func (e *Encoder) AddTagRaw(key, value []byte) + func (e *Encoder) Bytes() []byte + func (e *Encoder) ClearErr() + func (e *Encoder) EndLine(t time.Time) + func (e *Encoder) Err() error + func (e *Encoder) Reset() + func (e *Encoder) SetBuffer(buf []byte) + func (e *Encoder) SetBufferHint(n int) + func (e *Encoder) SetLax(lax bool) + func (e *Encoder) SetPrecision(p Precision) + func (e *Encoder) StartLine(measurement string) + func (e *Encoder) StartLineRaw(name []byte) + type Precision byte + const Microsecond + const Millisecond + const Nanosecond + const Second + func (p Precision) Duration() time.Duration + func (p Precision) String() string + type Value struct + func BoolValue(x bool) Value + func FloatValue(x float64) (Value, bool) + func IntValue(x int64) Value + func MustNewValue(x any) Value + func NewValue(x any) (Value, bool) + func NewValueFromBytes(kind ValueKind, data []byte) (Value, error) + func StringValue(x string) (Value, bool) + func StringValueFromBytes(x []byte) (Value, bool) + func UintValue(x uint64) Value + func (v Value) AppendBytes(dst []byte) []byte + func (v Value) BoolV() bool + func (v Value) BytesV() []byte + func (v Value) FloatV() float64 + func (v Value) IntV() int64 + func (v Value) Interface() any + func (v Value) Kind() ValueKind + func (v Value) String() string + func (v Value) StringV() string + func (v Value) UintV() uint64 + func (v1 Value) Equal(v2 Value) bool + type ValueKind uint8 + const Bool + const Float + const Int + const String + const Uint + const Unknown + func (k *ValueKind) UnmarshalText(data []byte) error + func (k ValueKind) MarshalText() ([]byte, error) + func (k ValueKind) String() string