netdata

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XTYPE_WEB_SERVICE  XlogType = 0
	XTYPE_APP_SERVICE  XlogType = 1
	XTYPE_BACK_THREAD  XlogType = 2
	XTYPE_BACK_THREAD2 XlogType = 4
	XTYPE_ZIPKIN_SPAN  XlogType = 5
	XTYPE_UNKNOWN      XlogType = 99

	XLOG_DISCARD_NONE          XlogDiscardType = 1
	XLOG_DISCARD_ALL           XlogDiscardType = 2
	XLOG_DISCARD_PROFILE       XlogDiscardType = 3
	XLOG_DISCARD_ALL_FORCE     XlogDiscardType = 4
	XLOG_DISCARD_PROFILE_FORCE XlogDiscardType = 5
)
View Source
const APICALL byte = 6
View Source
const APICALL2 byte = 15
View Source
const APICALL_SUM byte = 43
View Source
const CONTROL byte = 99
View Source
const DISPATCH byte = 13
View Source
const DUMP byte = 12
View Source
const HASHED_MESSAGE byte = 9
View Source
const MESSAGE byte = 3
View Source
const MESSAGE_SUM byte = 31
View Source
const METHOD byte = 1
View Source
const METHOD2 byte = 10
View Source
const METHOD_SUM byte = 11
View Source
const PARAMETERIZED_MESSAGE byte = 17
View Source
const SOCKET byte = 5
View Source
const SOCKET_SUM byte = 42
View Source
const SPAN byte = 51
View Source
const SPANCALL byte = 52
View Source
const SQL byte = 2
View Source
const SQL2 byte = 8
View Source
const SQL3 byte = 16
View Source
const SQL_SUM byte = 21
View Source
const THREAD_CALL_POSSIBLE byte = 14
View Source
const THREAD_SUBMIT byte = 7
View Source
const TimeTypeFiveMin int8 = 3
View Source
const TimeTypeRealTime int8 = 1

Variables

This section is empty.

Functions

func StepsToBytes

func StepsToBytes(steps []Step) []byte

Types

type AlertLevel

type AlertLevel uint8
const AlertError AlertLevel = 2
const AlertFatal AlertLevel = 3
const AlertInfo AlertLevel = 0
const AlertWarn AlertLevel = 1

type AlertPack

type AlertPack struct {
	Time    int64
	ObjType string
	ObjHash int32
	Level   AlertLevel
	Title   string
	Message string
	Tags    *MapValue
}

AlertPack has text info

func NewAlertPack

func NewAlertPack() *AlertPack

func (*AlertPack) GetPackType

func (pack *AlertPack) GetPackType() byte

GetPackType returns pack type

func (*AlertPack) Read

func (p *AlertPack) Read(in *DataInputX) (Pack, error)

func (*AlertPack) ToString

func (pack *AlertPack) ToString() string

func (*AlertPack) Write

func (p *AlertPack) Write(out *DataOutputX) error

type ApiCallStep added in v0.9.24

type ApiCallStep struct {
	SingleStep
	Txid    int64
	Hash    int32
	Elapsed int32
	CpuTime int32
	Error   int32
	Opt     uint8
	Address string
}

func NewApiCallStep added in v0.9.24

func NewApiCallStep() *ApiCallStep

func (*ApiCallStep) GetStepType added in v0.9.27

func (s *ApiCallStep) GetStepType() byte

func (*ApiCallStep) Write added in v0.9.24

func (s *ApiCallStep) Write(out *DataOutputX) error

type AsyncServiceStep

type AsyncServiceStep struct {
	SingleStep
	Txid    int64
	Hash    int32
	Elapsed int32
}

func NewAsyncServiceStep

func NewAsyncServiceStep() *AsyncServiceStep

func (*AsyncServiceStep) GetStepType

func (s *AsyncServiceStep) GetStepType() byte

func (*AsyncServiceStep) Write

func (s *AsyncServiceStep) Write(out *DataOutputX) error

type BlobValue added in v0.11.0

type BlobValue struct {
	Value []byte
}

BlobValue struct has number value

func NewBlobEmptyValue added in v0.11.0

func NewBlobEmptyValue() *BlobValue

NewBlobEmptyValue return BlobValue instance

func NewBlobValue added in v0.11.0

func NewBlobValue(value []byte) *BlobValue

NewBlobValue return DeciamlValue instance

func (*BlobValue) GetValueType added in v0.11.0

func (BlobValue *BlobValue) GetValueType() byte

GetValueType returns value type

func (*BlobValue) Read added in v0.11.0

func (BlobValue *BlobValue) Read(in *DataInputX) (Value, error)

Read function reads a value from datainputx

func (*BlobValue) ToString added in v0.11.0

func (BlobValue *BlobValue) ToString() string

ToString returns converted string value from decimal value

func (*BlobValue) Write added in v0.11.0

func (BlobValue *BlobValue) Write(out *DataOutputX) error

Write function writes a number value to dataoutputx

type BooleanValue

type BooleanValue struct {
	Value bool
}

BooleanValue has bool value

func NewBooleanEmptyValue

func NewBooleanEmptyValue() *BooleanValue

NewBooleanEmptyValue return new BooleanVaue instance

func NewBooleanValue

func NewBooleanValue(value bool) *BooleanValue

NewBooleanValue return new BooleanVaue instance

func (*BooleanValue) GetValueType

func (booleanValue *BooleanValue) GetValueType() byte

GetValueType returns value type

func (*BooleanValue) Read

func (booleanValue *BooleanValue) Read(in *DataInputX) (Value, error)

func (*BooleanValue) ToString

func (booleanValue *BooleanValue) ToString() string

ToString returns converted string value from boolean value

func (*BooleanValue) Write

func (booleanValue *BooleanValue) Write(out *DataOutputX) error

type DataInputX

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

DataInputX is a byte buffer read stream struct

func NewDataInputX

func NewDataInputX(any interface{}) *DataInputX

NewDataInputX returns DataInputX instace

func (*DataInputX) Read added in v0.11.0

func (in *DataInputX) Read(len int32) ([]byte, error)

func (*DataInputX) ReadBlob added in v0.11.0

func (in *DataInputX) ReadBlob() ([]byte, error)

func (*DataInputX) ReadBoolean

func (in *DataInputX) ReadBoolean() (bool, error)

ReadBoolean reads bool value

func (*DataInputX) ReadDecimal

func (in *DataInputX) ReadDecimal() (int64, error)

ReadDecimal returns number value

func (*DataInputX) ReadFloat32

func (in *DataInputX) ReadFloat32() (float32, error)

ReadFloat32 returns float32 value

func (*DataInputX) ReadFloat64 added in v0.11.0

func (in *DataInputX) ReadFloat64() (float64, error)

func (*DataInputX) ReadInt16

func (in *DataInputX) ReadInt16() (int16, error)

ReadInt16 returns int16 value

func (*DataInputX) ReadInt32

func (in *DataInputX) ReadInt32() (int32, error)

ReadInt32 returns int16 value

func (*DataInputX) ReadInt64

func (in *DataInputX) ReadInt64() (int64, error)

ReadInt64 returns int16 value

func (*DataInputX) ReadInt8

func (in *DataInputX) ReadInt8() (int8, error)

ReadInt8 returns int8 value

func (*DataInputX) ReadIntBytes

func (in *DataInputX) ReadIntBytes() ([]byte, error)

func (*DataInputX) ReadPack

func (in *DataInputX) ReadPack() (Pack, error)

func (*DataInputX) ReadString

func (in *DataInputX) ReadString() (string, error)

ReadString returns string value

func (*DataInputX) ReadUInt8

func (in *DataInputX) ReadUInt8() (uint8, error)

func (*DataInputX) ReadValue

func (in *DataInputX) ReadValue() (Value, error)

ReadValue reads value from datainputx

type DataOutputX

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

A DataOutputX is a output stream which used write various kinds of data.

func NewDataOutputX

func NewDataOutputX(any interface{}) *DataOutputX

NewDataOutputX returns DataOutputX object

func (*DataOutputX) Bytes

func (out *DataOutputX) Bytes() []byte

Bytes returns buffer's bytes

func (*DataOutputX) GetWriteSize

func (out *DataOutputX) GetWriteSize() int32

GetWriteSize returns written size

func (*DataOutputX) Size

func (out *DataOutputX) Size() int32

Size returns written size

func (*DataOutputX) Write

func (out *DataOutputX) Write(value []byte) error

func (*DataOutputX) WriteBlob

func (out *DataOutputX) WriteBlob(value []byte) error

WriteBlob writes byte array to buffer

func (*DataOutputX) WriteBoolean

func (out *DataOutputX) WriteBoolean(value bool) (*DataOutputX, error)

WriteBoolean write bool valvue to buffer

func (*DataOutputX) WriteDecimal

func (out *DataOutputX) WriteDecimal(value int64) (*DataOutputX, error)

WriteDecimal writes number type value to buffer

func (*DataOutputX) WriteDecimal32

func (out *DataOutputX) WriteDecimal32(value int32) (*DataOutputX, error)

func (*DataOutputX) WriteFloat32

func (out *DataOutputX) WriteFloat32(value float32) (*DataOutputX, error)

WriteFloat32 writes float32 value to buffer

func (*DataOutputX) WriteFloat64 added in v0.11.0

func (out *DataOutputX) WriteFloat64(value float64) (*DataOutputX, error)

WriteFloat64 writes float64 value to buffer

func (*DataOutputX) WriteInt16

func (out *DataOutputX) WriteInt16(value int16) (*DataOutputX, error)

WriteInt16 write int16 number to buffer.

func (*DataOutputX) WriteInt32

func (out *DataOutputX) WriteInt32(value int32) (*DataOutputX, error)

WriteInt32 write int32 number to buffer.

func (*DataOutputX) WriteInt32Array

func (out *DataOutputX) WriteInt32Array(values []int32) (*DataOutputX, error)

func (*DataOutputX) WriteInt64

func (out *DataOutputX) WriteInt64(value int64) (*DataOutputX, error)

WriteInt64 write int64 number to buffer.

func (*DataOutputX) WriteInt8

func (out *DataOutputX) WriteInt8(value int8) (*DataOutputX, error)

WriteInt8 write int8 number to buffer

func (*DataOutputX) WriteIntBytes

func (out *DataOutputX) WriteIntBytes(value []byte) error

func (*DataOutputX) WritePack

func (out *DataOutputX) WritePack(pack Pack) (*DataOutputX, error)

func (*DataOutputX) WriteStep

func (out *DataOutputX) WriteStep(step Step) (*DataOutputX, error)

func (*DataOutputX) WriteString

func (out *DataOutputX) WriteString(value string) (*DataOutputX, error)

WriteString writes string value to buffer

func (*DataOutputX) WriteUInt64

func (out *DataOutputX) WriteUInt64(value uint64) (*DataOutputX, error)

WriteUInt64 write uint64 number to buffer.

func (*DataOutputX) WriteUInt8

func (out *DataOutputX) WriteUInt8(value uint8) (*DataOutputX, error)

WriteUInt8 write int8 number to buffer

func (*DataOutputX) WriteValue

func (out *DataOutputX) WriteValue(value Value) (*DataOutputX, error)

WriteValue wtires value type to buffer

type DecimalValue

type DecimalValue struct {
	Value int64
}

DecimalValue struct has number value

func NewDecimalEmptyValue

func NewDecimalEmptyValue() *DecimalValue

NewDecimalEmptyValue return DeciamlValue instance

func NewDecimalValue

func NewDecimalValue(value int64) *DecimalValue

NewDecimalValue return DeciamlValue instance

func (*DecimalValue) GetValueType

func (decimalValue *DecimalValue) GetValueType() byte

GetValueType returns value type

func (*DecimalValue) Read

func (decimalValue *DecimalValue) Read(in *DataInputX) (Value, error)

Read function reads a value from datainputx

func (*DecimalValue) ToString

func (decimalValue *DecimalValue) ToString() string

ToString returns converted string value from decimal value

func (*DecimalValue) Write

func (decimalValue *DecimalValue) Write(out *DataOutputX) error

Write function writes a number value to dataoutputx

type DoubleValue added in v0.11.0

type DoubleValue struct {
	Value float64
}

func NewDoubleEmptyValue added in v0.11.0

func NewDoubleEmptyValue() *DoubleValue

NewFloatEmptyValue returns new FloatValue instance

func NewDoubleValue added in v0.11.0

func NewDoubleValue(value float64) *DoubleValue

func (*DoubleValue) GetValueType added in v0.11.0

func (value *DoubleValue) GetValueType() byte

GetValueType returns value type

func (*DoubleValue) Read added in v0.11.0

func (value *DoubleValue) Read(in *DataInputX) (Value, error)

Read function reads a value from datainputx

func (*DoubleValue) ToString added in v0.11.0

func (value *DoubleValue) ToString() string

ToString returns converted float value

func (*DoubleValue) Write added in v0.11.0

func (value *DoubleValue) Write(out *DataOutputX) error

Write function write a float value to dataoutputx

type DumpStep

type DumpStep struct {
	SingleStep
	Stacks []int32
	// contains filtered or unexported fields
}

func NewDumpStep

func NewDumpStep() *DumpStep

func (*DumpStep) GetStepType

func (s *DumpStep) GetStepType() byte

func (*DumpStep) Write

func (s *DumpStep) Write(out *DataOutputX) error

type Float32Value

type Float32Value struct {
	Value float32
}

Float32Value has float32 value

func NewFloatEmptyValue

func NewFloatEmptyValue() *Float32Value

NewFloatEmptyValue returns new FloatValue instance

func NewFloatValue

func NewFloatValue(value float32) *Float32Value

NewFloatValue returns new FloatValue instance

func (*Float32Value) GetValueType

func (floatValue *Float32Value) GetValueType() byte

GetValueType returns value type

func (*Float32Value) Read

func (floatValue *Float32Value) Read(in *DataInputX) (Value, error)

Read function reads a value from datainputx

func (*Float32Value) ToString

func (floatValue *Float32Value) ToString() string

ToString returns converted float value

func (*Float32Value) Write

func (floatValue *Float32Value) Write(out *DataOutputX) error

Write function write a float value to dataoutputx

type HashedMessageStep

type HashedMessageStep struct {
	SingleStep
	Hash  int32
	Time  int32
	Value int32
}

func NewHashedMessageStep

func NewHashedMessageStep(hash int32, startTime int32) *HashedMessageStep

func (*HashedMessageStep) GetStepType

func (s *HashedMessageStep) GetStepType() byte

func (*HashedMessageStep) Write

func (s *HashedMessageStep) Write(out *DataOutputX) error

type Ip4Value added in v0.11.0

type Ip4Value struct {
	Value []byte
}

Ip4Value struct has number value

func NewIp4EmptyValue added in v0.11.0

func NewIp4EmptyValue() *Ip4Value

NewIp4EmptyValue return Ip4Value instance

func NewIp4Value added in v0.11.0

func NewIp4Value(ip string) *Ip4Value

NewIp4Value return DeciamlValue instance

func (*Ip4Value) GetValueType added in v0.11.0

func (Ip4Value *Ip4Value) GetValueType() byte

GetValueType returns value type

func (*Ip4Value) Read added in v0.11.0

func (Ip4Value *Ip4Value) Read(in *DataInputX) (Value, error)

Read function reads a value from datainputx

func (*Ip4Value) ToString added in v0.11.0

func (Ip4Value *Ip4Value) ToString() string

ToString returns converted string value from decimal value

func (*Ip4Value) Write added in v0.11.0

func (Ip4Value *Ip4Value) Write(out *DataOutputX) error

Write function writes a number value to dataoutputx

type ListValue

type ListValue struct {
	Value []Value
}

ListValue has Value type Slice

func NewListValue

func NewListValue() *ListValue

NewListValue returns new ListVaue instance

func NewListValueWithValue

func NewListValueWithValue(value []Value) *ListValue

NewListValueWithValue returns new ListVaue instance

func (*ListValue) Add

func (listValue *ListValue) Add(value Value) *ListValue

Add function adds a value to slice

func (*ListValue) AddBoolean

func (listValue *ListValue) AddBoolean(value bool) *ListValue

AddString add a string value to slice

func (*ListValue) AddFloat

func (listValue *ListValue) AddFloat(value float32) *ListValue

AddFloat add a float value to slice

func (*ListValue) AddInt32

func (listValue *ListValue) AddInt32(value int32) *ListValue

AddInt32 adds a int64 value to slice

func (*ListValue) AddInt64

func (listValue *ListValue) AddInt64(value int64) *ListValue

AddInt64 adds a int64 value to slice

func (*ListValue) AddString

func (listValue *ListValue) AddString(value string) *ListValue

AddString add a string value to slice

func (*ListValue) GetBoolean

func (listValue *ListValue) GetBoolean(i int) bool

GetBoolean returns bool value

func (*ListValue) GetFloat

func (listValue *ListValue) GetFloat(i int) float32

GetFloat returns float value

func (*ListValue) GetInt32

func (listValue *ListValue) GetInt32(i int) int32

GetInt32 returns int32 value

func (*ListValue) GetInt64

func (listValue *ListValue) GetInt64(i int) int64

GetInt64 returns int64 value

func (*ListValue) GetString

func (listValue *ListValue) GetString(i int) string

GetString returns string value

func (*ListValue) GetValueType

func (listValue *ListValue) GetValueType() byte

GetValueType returns value type

func (*ListValue) Read

func (listValue *ListValue) Read(in *DataInputX) (Value, error)

Read function reads value from datainputx

func (*ListValue) Size

func (listValue *ListValue) Size() int

Size retunrs slice's size

func (*ListValue) ToString

func (listValue *ListValue) ToString() string

ToString returns converted string value

func (*ListValue) Write

func (listValue *ListValue) Write(out *DataOutputX) error

Write function writes list value to outputx

type MapPack

type MapPack struct {
	Table map[string]Value
}

func NewMapPack

func NewMapPack() *MapPack

func (*MapPack) ContainsKey

func (mapPack *MapPack) ContainsKey(key string) bool

ContainsKey returns whether mapvalue contains value for given key

func (*MapPack) GetBoolean

func (mapPack *MapPack) GetBoolean(key string) bool

GetBoolean returns string value

func (*MapPack) GetInt16

func (mapPack *MapPack) GetInt16(key string) int16

GetInt16 returns int16 value

func (*MapPack) GetInt32

func (mapPack *MapPack) GetInt32(key string) int32

GetInt32 returns int32 value

func (*MapPack) GetInt64

func (mapPack *MapPack) GetInt64(key string) int64

GetInt64 returns int64 value

func (*MapPack) GetInt8

func (mapPack *MapPack) GetInt8(key string) int8

GetInt8 returns int8 value

func (*MapPack) GetPackType

func (mapPack *MapPack) GetPackType() byte

GetValueType returns value type

func (*MapPack) GetString

func (mapPack *MapPack) GetString(key string) string

GetString returns string value

func (*MapPack) IsEmpty

func (mapPack *MapPack) IsEmpty() bool

func (*MapPack) NewList

func (mapPack *MapPack) NewList(key string) *ListValue

func (*MapPack) Put

func (mapPack *MapPack) Put(key string, any interface{})

Put add string value to map

func (*MapPack) Read

func (mapPack *MapPack) Read(in *DataInputX) (Pack, error)

Read will reads a value from datainputx

func (*MapPack) ToString

func (mapPack *MapPack) ToString() string

ToString returns converted string map data

func (*MapPack) Write

func (mapPack *MapPack) Write(out *DataOutputX) error

Write function write a text value to dataoutputx

type MapValue

type MapValue struct {
	Table map[string]Value
}

MapValue has map data

func NewMapValue

func NewMapValue() *MapValue

NewMapValue returns new MapValue instance

func (*MapValue) ContainesKey

func (mapValue *MapValue) ContainesKey(key string) bool

ContainesKey returns whether mapvalue contains value for given key

func (*MapValue) GetBoolean

func (mapValue *MapValue) GetBoolean(key string) bool

GetBoolean returns string value

func (*MapValue) GetInt16

func (mapValue *MapValue) GetInt16(key string) int16

GetInt16 returns int16 value

func (*MapValue) GetInt32

func (mapValue *MapValue) GetInt32(key string) int32

GetInt32 returns int32 value

func (*MapValue) GetInt64

func (mapValue *MapValue) GetInt64(key string) int64

GetInt64 returns int64 value

func (*MapValue) GetInt8

func (mapValue *MapValue) GetInt8(key string) int8

GetInt8 returns int8 value

func (*MapValue) GetString

func (mapValue *MapValue) GetString(key string) string

GetString returns string value

func (*MapValue) GetValueType

func (mapValue *MapValue) GetValueType() byte

GetValueType returns value type

func (*MapValue) IsEmpty

func (mapValue *MapValue) IsEmpty() bool

IsEmpty return whether mapvalue is empty or not

func (*MapValue) Put

func (mapValue *MapValue) Put(key string, any interface{})

Put add string value to map

func (*MapValue) Read

func (mapValue *MapValue) Read(in *DataInputX) (Value, error)

Read will reads a value from datainputx

func (*MapValue) ToString

func (mapValue *MapValue) ToString() string

ToString returns converted string map data

func (*MapValue) Write

func (mapValue *MapValue) Write(out *DataOutputX) error

Write function write a text value to dataoutputx

type MessageStep

type MessageStep struct {
	SingleStep
	Message string
}

func NewMessageStep

func NewMessageStep(m string, startTime int32) *MessageStep

func (*MessageStep) GetStepType

func (s *MessageStep) GetStepType() byte

func (*MessageStep) Write

func (s *MessageStep) Write(out *DataOutputX) error

type MethodStep

type MethodStep struct {
	SingleStep
	Hash    int32
	Elapsed int32
	CpuTime int32
}

func NewMethodStep

func NewMethodStep() *MethodStep

func (*MethodStep) GetStepType

func (s *MethodStep) GetStepType() byte

func (*MethodStep) Write

func (s *MethodStep) Write(out *DataOutputX) error

type NilValue

type NilValue struct {
	Value interface{}
}

NilValue has nil value

func NewNilValue

func NewNilValue() *NilValue

NewNilValue returns new NilValue instance

func (*NilValue) GetValueType

func (nilValue *NilValue) GetValueType() byte

GetValueType returns value type

func (*NilValue) Read

func (nilValue *NilValue) Read(in *DataInputX) (Value, error)

Read return nil value

func (*NilValue) ToString

func (nilValue *NilValue) ToString() string

ToString returns null string

func (*NilValue) Write

func (nilValue *NilValue) Write(out *DataOutputX) error

Write wrtire nil value to output

type ObjectPack

type ObjectPack struct {
	ObjType string
	ObjHash int32
	ObjName string
	Address string
	Version string
	Alive   bool
	Wakeup  int64
	Tags    *MapValue
}

ObjectPack has object info

func NewObjectPack

func NewObjectPack() *ObjectPack

NewObjectPack returns new object pack instance

func (*ObjectPack) GetPackType

func (objectPack *ObjectPack) GetPackType() byte

GetPackType returns pack type

func (*ObjectPack) Read

func (objectPack *ObjectPack) Read(in *DataInputX) (Pack, error)

func (*ObjectPack) SetStatus

func (objectPack *ObjectPack) SetStatus(status int)

func (*ObjectPack) ToString

func (objectPack *ObjectPack) ToString() string

ToString returns objectpack2 info

func (*ObjectPack) Write

func (objectPack *ObjectPack) Write(out *DataOutputX) error

type ObjectPack2

type ObjectPack2 struct {
	SiteID  string
	ObjType string
	ObjHash int32
	ObjName string
	Address string
	Version string
	Alive   bool
	Wakeup  int64
	Family  int8
	Tags    *MapValue
}

ObjectPack2 has object info

func NewObjectPack2

func NewObjectPack2() *ObjectPack2

NewObjectPack2 returns new object pack instance

func (*ObjectPack2) GetPackType

func (objectPack *ObjectPack2) GetPackType() byte

GetPackType returns pack type

func (*ObjectPack2) Read

func (objectPack *ObjectPack2) Read(in *DataInputX) (Pack, error)

func (*ObjectPack2) SetStatus

func (objectPack *ObjectPack2) SetStatus(status int)

func (*ObjectPack2) ToString

func (objectPack *ObjectPack2) ToString() string

ToString returns objectpack2 info

func (*ObjectPack2) Write

func (objectPack *ObjectPack2) Write(out *DataOutputX) error

type PMessageLevel

type PMessageLevel byte
const PMSG_DEBUG PMessageLevel = 0
const PMSG_ERROR PMessageLevel = 3
const PMSG_FATAL PMessageLevel = 4
const PMSG_INFO PMessageLevel = 1
const PMSG_WARN PMessageLevel = 2

type PMessageStep

type PMessageStep struct {
	SingleStep
	Hash    int32
	Elapsed int32
	Level   PMessageLevel
	// contains filtered or unexported fields
}

func NewPMessageStep

func NewPMessageStep(startTime int32) *PMessageStep

func (*PMessageStep) GetStepType

func (s *PMessageStep) GetStepType() byte

func (*PMessageStep) SetMessage

func (s *PMessageStep) SetMessage(hash int32, params ...string)

func (*PMessageStep) Write

func (s *PMessageStep) Write(out *DataOutputX) error

type Pack

type Pack interface {
	Write(out *DataOutputX) error
	Read(in *DataInputX) (Pack, error)
	ToString() string
	GetPackType() byte
}

Pack is a interface

func CreatePack

func CreatePack(packType byte) Pack

CreateValue return Value instacne

type PerfCounterK8SPack

type PerfCounterK8SPack struct {
	Time           int64
	SiteID         string
	Cluster        string
	NameSpace      string
	NodeName       string
	DaemonSetName  string
	DeploymentName string
	PodName        string
	ContainerName  string
	ObjName        string
	Timetype       int8
	MetricLevel    int8
	Data           *MapValue
}

PerfCounterPack has metric counter which has key/value type

func NewPerfCounterK8SPack

func NewPerfCounterK8SPack() *PerfCounterK8SPack

NewPerfCounterPack returns PerfCounterPack instance

func (*PerfCounterK8SPack) GetPackType

func (pack *PerfCounterK8SPack) GetPackType() byte

GetPackType returns pack type

func (*PerfCounterK8SPack) Put

func (pack *PerfCounterK8SPack) Put(key string, any interface{})

Put will put key/value to PerfCounterPack

func (*PerfCounterK8SPack) Read

func (pack *PerfCounterK8SPack) Read(in *DataInputX) (Pack, error)

Read will read PerfCounterPack from datainputx

func (*PerfCounterK8SPack) ToString

func (pack *PerfCounterK8SPack) ToString() string

ToString returns converted perfcounterpack value

func (*PerfCounterK8SPack) Write

func (pack *PerfCounterK8SPack) Write(out *DataOutputX) error

Write will write PerfCounterPack to datoutputx

type PerfCounterPack

type PerfCounterPack struct {
	Time     int64
	ObjName  string
	Timetype int8
	Data     *MapValue
}

PerfCounterPack has metric counter which has key/value type

func NewPerfCounterPack

func NewPerfCounterPack() *PerfCounterPack

NewPerfCounterPack returns PerfCounterPack instance

func (*PerfCounterPack) GetPackType

func (pack *PerfCounterPack) GetPackType() byte

GetPackType returns pack type

func (*PerfCounterPack) Put

func (pack *PerfCounterPack) Put(key string, any interface{})

Put will put key/value to PerfCounterPack

func (*PerfCounterPack) Read

func (pack *PerfCounterPack) Read(in *DataInputX) (Pack, error)

Read will read PerfCounterPack from datainputx

func (*PerfCounterPack) ToString

func (pack *PerfCounterPack) ToString() string

ToString returns converted perfcounterpack value

func (*PerfCounterPack) Write

func (pack *PerfCounterPack) Write(out *DataOutputX) error

Write will write PerfCounterPack to datoutputx

type SingleStep

type SingleStep struct {
	Parent    int32
	Index     int32
	StartTime int32
}

func (*SingleStep) GetOrder

func (ss *SingleStep) GetOrder() int32

func (*SingleStep) GetParent

func (ss *SingleStep) GetParent() int32

func (*SingleStep) GetStepType

func (ss *SingleStep) GetStepType() byte

func (*SingleStep) Read

func (ss *SingleStep) Read(in *DataInputX) (Step, error)

func (*SingleStep) SetIndex

func (ss *SingleStep) SetIndex(index int32)

func (*SingleStep) SetParent

func (ss *SingleStep) SetParent(parent int32)

func (*SingleStep) Write

func (ss *SingleStep) Write(out *DataOutputX) error

type Step

type Step interface {
	GetOrder() int32
	GetStepType() byte
	Write(out *DataOutputX) error
	Read(in *DataInputX) (Step, error)

	SetIndex(index int32)
	SetParent(parent int32)
	GetParent() int32
}

type TextHashValue added in v0.11.0

type TextHashValue struct {
	Value int32
}

TextHashValue struct has number value

func NewTextHashEmptyValue added in v0.11.0

func NewTextHashEmptyValue() *TextHashValue

NewDecimalEmptyValue return DeciamlValue instance

func NewTextHashValue added in v0.11.0

func NewTextHashValue(value int32) *TextHashValue

NewTextHashValue return DeciamlValue instance

func (*TextHashValue) GetValueType added in v0.11.0

func (text *TextHashValue) GetValueType() byte

GetValueType returns value type

func (*TextHashValue) Read added in v0.11.0

func (text *TextHashValue) Read(in *DataInputX) (Value, error)

Read function reads a value from datainputx

func (*TextHashValue) ToString added in v0.11.0

func (text *TextHashValue) ToString() string

ToString returns converted string value from decimal value

func (*TextHashValue) Write added in v0.11.0

func (text *TextHashValue) Write(out *DataOutputX) error

Write function writes a number value to dataoutputx

type TextPack

type TextPack struct {
	Xtype texttype.TextType
	Hash  int32
	Text  string
}

TextPack has text info

func NewTextPack

func NewTextPack() *TextPack

func (*TextPack) GetPackType

func (pack *TextPack) GetPackType() byte

GetPackType returns pack type

func (*TextPack) Read

func (p *TextPack) Read(in *DataInputX) (Pack, error)

func (*TextPack) ToString

func (pack *TextPack) ToString() string

func (*TextPack) Write

func (p *TextPack) Write(out *DataOutputX) error

type TextValue

type TextValue struct {
	Value string
}

TextValue contains string value

func NewTextEmptyValue

func NewTextEmptyValue() *TextValue

NewTextEmptyValue returns TextValue instance

func NewTextValue

func NewTextValue(value string) *TextValue

NewTextValue returns TextValue instance

func (*TextValue) GetValueType

func (textValue *TextValue) GetValueType() byte

GetValueType returns value type

func (*TextValue) Read

func (textValue *TextValue) Read(in *DataInputX) (Value, error)

Read function reads a value from datainputx

func (*TextValue) ToString

func (textValue *TextValue) ToString() string

ToString returns value

func (*TextValue) Write

func (textValue *TextValue) Write(out *DataOutputX) error

Write function write a text value to dataoutputx

type Value

type Value interface {
	Write(out *DataOutputX) error
	Read(in *DataInputX) (Value, error)
	GetValueType() byte
	ToString() string
}

Value is interface for all value type

func CreateValue

func CreateValue(valueType byte) Value

CreateValue return Value instance

type XlogDiscardType

type XlogDiscardType uint8

type XlogPack

type XlogPack struct {
	EndTime int64
	ObjHash int32

	Service int32

	Txid           int64
	ThreadNameHash int32
	Caller         int64
	Gxid           int64

	Elapsed int32

	Error    int32
	Cpu      int32
	SqlCount int32
	SqlTime  int32
	Ipaddr   []byte
	Kbytes   int32
	Status   int32
	Userid   int64

	UserAgent int32
	Referer   int32
	Group     int32

	ApicallCount int32
	ApicallTime  int32

	CountryCode string
	City        int32

	XType XlogType

	Login int32
	Desc  int32

	WebHash int32
	WebTime int32

	HasDump byte

	Text1 string
	Text2 string

	QueuingHostHash    int32
	QueuingTime        int32
	Queuing2ndHostHash int32
	Queuing2ndTime     int32

	Text3 string
	Text4 string
	Text5 string

	ProfileCount                   int32
	B3Mode                         bool
	ProfileSize                    int32
	DiscardType                    XlogDiscardType
	IgnoreGlobalConsequentSampling bool
}

XlogPack has xlog info

func NewXlogPack

func NewXlogPack() *XlogPack

func (*XlogPack) GetPackType

func (pack *XlogPack) GetPackType() byte

GetPackType returns pack type

func (*XlogPack) IsDriving

func (p *XlogPack) IsDriving() bool

func (*XlogPack) Read

func (p *XlogPack) Read(in *DataInputX) (Pack, error)

func (*XlogPack) ToString

func (pack *XlogPack) ToString() string

func (*XlogPack) Write

func (p *XlogPack) Write(out *DataOutputX) error

type XlogProfilePack

type XlogProfilePack struct {
	Time    int64
	ObjHash int32
	Service int32
	Txid    int64
	Elapsed int32
	Profile []byte
}

func NewXlogProfilePack

func NewXlogProfilePack() *XlogProfilePack

func (*XlogProfilePack) GetPackType

func (pack *XlogProfilePack) GetPackType() byte

func (*XlogProfilePack) Read

func (p *XlogProfilePack) Read(in *DataInputX) (Pack, error)

func (*XlogProfilePack) ToString

func (pack *XlogProfilePack) ToString() string

func (*XlogProfilePack) Write

func (p *XlogProfilePack) Write(out *DataOutputX) error

type XlogType

type XlogType uint8

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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