Documentation
¶
Index ¶
- Constants
- Variables
- func Dump(p []byte) (r string)
- type BigKind
- type Decoder
- func (d *Decoder) BigFloat(p []byte, st int, x *big.Float) (text []byte, i int)
- func (d *Decoder) BigInt(p []byte, st int, x *big.Int) (raw []byte, i int)
- func (d *Decoder) BigRat(p []byte, st int, x *big.Rat) (num, denom []byte, i int)
- func (d *Decoder) BigWhich(p []byte, st int) BigKind
- func (d *Decoder) Caller(p []byte, st int) (pc loc.PC, i int)
- func (d *Decoder) Callers(p []byte, st int) (pc loc.PC, pcs loc.PCs, i int)
- func (d *Decoder) Time(p []byte, st int) (t time.Time, i int)
- func (d *Decoder) Timestamp(p []byte, st int) (ts int64, i int)
- type Dumper
- type Encoder
- func (e *Encoder) AppendArray(b []byte, l int) []byte
- func (e *Encoder) AppendBigFloat(b []byte, x *big.Float) []byte
- func (e *Encoder) AppendBigInt(b []byte, x *big.Int) []byte
- func (e *Encoder) AppendBigRat(b []byte, x *big.Rat) []byte
- func (e *Encoder) AppendBreak(b []byte) []byte
- func (e *Encoder) AppendDuration(b []byte, d time.Duration) []byte
- func (e *Encoder) AppendError(b []byte, err error) []byte
- func (e *Encoder) AppendFormat(b []byte, fmt string, args ...interface{}) []byte
- func (e *Encoder) AppendKey(b []byte, k string) []byte
- func (e *Encoder) AppendKeyBytes(b []byte, k string, v []byte) []byte
- func (e *Encoder) AppendKeyInt(b []byte, k string, v int) []byte
- func (e *Encoder) AppendKeyInt64(b []byte, k string, v int64) []byte
- func (e *Encoder) AppendKeyString(b []byte, k, v string) []byte
- func (e *Encoder) AppendKeyUint(b []byte, k string, v uint) []byte
- func (e *Encoder) AppendKeyUint64(b []byte, k string, v uint64) []byte
- func (e *Encoder) AppendKeyValue(b []byte, k string, v interface{}) []byte
- func (e *Encoder) AppendMap(b []byte, l int) []byte
- func (e *Encoder) AppendNil(b []byte) []byte
- func (e *Encoder) AppendPC(b []byte, pc loc.PC) []byte
- func (e *Encoder) AppendPCs(b []byte, pcs loc.PCs) []byte
- func (e *Encoder) AppendTime(b []byte, t time.Time) []byte
- func (e *Encoder) AppendTimestamp(b []byte, t int64) []byte
- func (e *Encoder) AppendValue(b []byte, v interface{}) []byte
- func (e *Encoder) InsertLen(b []byte, st, l int) []byte
- type LowDecoder
- func (d *LowDecoder) Break(b []byte, i *int) bool
- func (d *LowDecoder) Float(b []byte, st int) (v float64, i int)
- func (d *LowDecoder) Signed(b []byte, st int) (v int64, i int)
- func (d *LowDecoder) Skip(b []byte, st int) (i int)
- func (d *LowDecoder) SkipTag(b []byte, st int) (tag byte, sub int64, i int)
- func (d *LowDecoder) String(b []byte, st int) (v []byte, i int)
- func (d *LowDecoder) Tag(b []byte, st int) (tag byte, sub int64, i int)
- func (d *LowDecoder) TagOnly(b []byte, st int) (tag byte)
- func (d *LowDecoder) Unsigned(b []byte, st int) (v uint64, i int)
- type LowEncoder
- func (e *LowEncoder) AppendBreak(b []byte) []byte
- func (e *LowEncoder) AppendBytes(b, s []byte) []byte
- func (e *LowEncoder) AppendFloat(b []byte, v float64) []byte
- func (e *LowEncoder) AppendInt(b []byte, v int) []byte
- func (e *LowEncoder) AppendInt64(b []byte, v int64) []byte
- func (e *LowEncoder) AppendSemantic(b []byte, s int) []byte
- func (e *LowEncoder) AppendSpecial(b []byte, x byte) []byte
- func (e *LowEncoder) AppendString(b []byte, s string) []byte
- func (e *LowEncoder) AppendTag(b []byte, tag byte, v int) []byte
- func (e *LowEncoder) AppendTag64(b []byte, tag byte, v int64) []byte
- func (e *LowEncoder) AppendTagBytes(b []byte, tag byte, s []byte) []byte
- func (e *LowEncoder) AppendTagInt(b []byte, tag byte, v uint64) []byte
- func (e *LowEncoder) AppendTagString(b []byte, tag byte, s string) []byte
- func (e *LowEncoder) AppendUint(b []byte, v uint) []byte
- func (e *LowEncoder) AppendUint64(b []byte, v uint64) []byte
- type State
- type StreamDecoder
- type SubState
- type Tag
- type TlogAppender
- type TlogParser
Constants ¶
View Source
const ( Int = iota << 5 Neg Bytes String Array Map Semantic Special TagMask = 0b111_00000 TagDetMask = 0b000_11111 )
Basic types.
View Source
const ( Len1 = 24 + iota Len2 Len4 Len8 LenBreak = Break )
Len.
View Source
const ( False = 20 + iota True Nil Undefined Float8 Float16 Float32 Float64 Break = 1<<5 - 1 )
Specials.
View Source
const ( Meta = iota Error Time Duration Big Caller Hex SemanticExtBase )
Semantics.
Variables ¶
View Source
var ErrSubstate = errors.New("in substate")
Functions ¶
Types ¶
type Decoder ¶
type Decoder struct {
LowDecoder
}
type Dumper ¶
type Dumper struct {
LowDecoder
io.Writer
NoGlobalOffset bool
// contains filtered or unexported fields
}
type Encoder ¶
type Encoder struct {
LowEncoder
}
func (*Encoder) AppendBigFloat ¶ added in v0.13.0
func (*Encoder) AppendBigInt ¶ added in v0.13.0
func (*Encoder) AppendBigRat ¶ added in v0.13.0
func (*Encoder) AppendBreak ¶
func (*Encoder) AppendFormat ¶
func (*Encoder) AppendKeyBytes ¶
func (*Encoder) AppendKeyInt64 ¶ added in v0.13.0
func (*Encoder) AppendKeyUint64 ¶ added in v0.13.0
func (*Encoder) AppendKeyValue ¶
func (*Encoder) AppendValue ¶
type LowEncoder ¶
type LowEncoder struct{}
func (*LowEncoder) AppendBreak ¶ added in v0.14.0
func (e *LowEncoder) AppendBreak(b []byte) []byte
func (*LowEncoder) AppendBytes ¶ added in v0.13.0
func (e *LowEncoder) AppendBytes(b, s []byte) []byte
func (*LowEncoder) AppendFloat ¶
func (e *LowEncoder) AppendFloat(b []byte, v float64) []byte
func (*LowEncoder) AppendInt64 ¶ added in v0.13.0
func (e *LowEncoder) AppendInt64(b []byte, v int64) []byte
func (*LowEncoder) AppendSemantic ¶ added in v0.13.0
func (e *LowEncoder) AppendSemantic(b []byte, s int) []byte
func (*LowEncoder) AppendSpecial ¶ added in v0.13.0
func (e *LowEncoder) AppendSpecial(b []byte, x byte) []byte
func (*LowEncoder) AppendString ¶
func (e *LowEncoder) AppendString(b []byte, s string) []byte
func (*LowEncoder) AppendTag64 ¶ added in v0.13.0
func (e *LowEncoder) AppendTag64(b []byte, tag byte, v int64) []byte
func (*LowEncoder) AppendTagBytes ¶ added in v0.14.0
func (e *LowEncoder) AppendTagBytes(b []byte, tag byte, s []byte) []byte
func (*LowEncoder) AppendTagInt ¶ added in v0.13.0
func (e *LowEncoder) AppendTagInt(b []byte, tag byte, v uint64) []byte
func (*LowEncoder) AppendTagString ¶ added in v0.13.0
func (e *LowEncoder) AppendTagString(b []byte, tag byte, s string) []byte
func (*LowEncoder) AppendUint ¶ added in v0.13.0
func (e *LowEncoder) AppendUint(b []byte, v uint) []byte
func (*LowEncoder) AppendUint64 ¶ added in v0.13.0
func (e *LowEncoder) AppendUint64(b []byte, v uint64) []byte
type StreamDecoder ¶
func NewStreamDecoder ¶
func NewStreamDecoder(r io.Reader) *StreamDecoder
func (*StreamDecoder) Decode ¶ added in v0.12.1
func (d *StreamDecoder) Decode() (data []byte, err error)
type TlogAppender ¶
Click to show internal directories.
Click to hide internal directories.