Versions in this module Expand all Collapse all v0 v0.6.2 Jan 4, 2021 Changes in this version + const DefaultLineEnding + var GetPool = _pool.Get + func EpochTimeEncoder(t time.Time, enc PrimitiveArrayEncoder) + func SecondsDurationEncoder(d time.Duration, enc PrimitiveArrayEncoder) + type ArrayEncoder interface + AppendArray func(ArrayMarshaler) error + AppendDuration func(time.Duration) + AppendObject func(ObjectMarshaler) error + AppendReflected func(value interface{}) error + AppendTime func(time.Time) + type ArrayMarshaler interface + MarshalLogArray func(ArrayEncoder) error + type ArrayMarshalerFunc func(ArrayEncoder) error + func (f ArrayMarshalerFunc) MarshalLogArray(enc ArrayEncoder) error + type Buffer struct + func NewBuffer(_size int) *Buffer + func (b *Buffer) AppendBool(v bool) + func (b *Buffer) AppendByte(v byte) + func (b *Buffer) AppendFloat(f float64, bitSize int) + func (b *Buffer) AppendInt(i int64) + func (b *Buffer) AppendString(s string) + func (b *Buffer) AppendUint(i uint64) + func (b *Buffer) Bytes() []byte + func (b *Buffer) Cap() int + func (b *Buffer) Free() + func (b *Buffer) Len() int + func (b *Buffer) Reset() + func (b *Buffer) String() string + func (b *Buffer) TrimNewline() + func (b *Buffer) Write(bs []byte) (int, error) + type DurationEncoder func(time.Duration, PrimitiveArrayEncoder) + type Encoder interface + Clone func() Encoder + Encode func(*Buffer, ...Field) error + func NewJSONEncoder(cfg EncoderConfig, buf *Buffer) Encoder + type EncoderConfig struct + EncodeDuration DurationEncoder + EncodeTime TimeEncoder + type Field struct + Int64Val int64 + Key string + StringVal string + Type FieldType + Value interface{} + func (f Field) AddTo(enc ObjectEncoder) + type FieldType int32 + const DurationType + const Float32Type + const Float64Type + const Int64Type + const IntTpye + const StringType + const Uint64Type + const UintType + const UnknownType + type ObjectEncoder interface + AddArray func(key string, marshaler ArrayMarshaler) error + AddBinary func(key string, value []byte) + AddBool func(key string, value bool) + AddByteString func(key string, value []byte) + AddComplex128 func(key string, value complex128) + AddComplex64 func(key string, value complex64) + AddDuration func(key string, value time.Duration) + AddFloat32 func(key string, value float32) + AddFloat64 func(key string, value float64) + AddInt func(key string, value int) + AddInt16 func(key string, value int16) + AddInt32 func(key string, value int32) + AddInt64 func(key string, value int64) + AddInt8 func(key string, value int8) + AddObject func(key string, marshaler ObjectMarshaler) error + AddReflected func(key string, value interface{}) error + AddString func(key, value string) + AddTime func(key string, value time.Time) + AddUint func(key string, value uint) + AddUint16 func(key string, value uint16) + AddUint32 func(key string, value uint32) + AddUint64 func(key string, value uint64) + AddUint8 func(key string, value uint8) + AddUintptr func(key string, value uintptr) + OpenNamespace func(key string) + type ObjectMarshaler interface + MarshalLogObject func(ObjectEncoder) error + type ObjectMarshalerFunc func(ObjectEncoder) error + func (f ObjectMarshalerFunc) MarshalLogObject(enc ObjectEncoder) error + type Pool struct + func NewPool(size int) Pool + func (p Pool) Get() *Buffer + type PrimitiveArrayEncoder interface + AppendBool func(bool) + AppendByteString func([]byte) + AppendComplex128 func(complex128) + AppendComplex64 func(complex64) + AppendFloat32 func(float32) + AppendFloat64 func(float64) + AppendInt func(int) + AppendInt16 func(int16) + AppendInt32 func(int32) + AppendInt64 func(int64) + AppendInt8 func(int8) + AppendString func(string) + AppendUint func(uint) + AppendUint16 func(uint16) + AppendUint32 func(uint32) + AppendUint64 func(uint64) + AppendUint8 func(uint8) + AppendUintptr func(uintptr) + type TimeEncoder func(time.Time, PrimitiveArrayEncoder)