Versions in this module Expand all Collapse all v1 v1.0.2 Sep 12, 2021 Changes in this version + var ErrInvalidID = errors.New("xid: invalid ID") + var Recorders = []Recorder + var ShouldRecordAction = func(action Action) bool + func EncodeAnyByteArray(s []byte) json.RawMessage + func UnzipHttpRepsonse(data []byte) []byte + type Action interface + GetActionIndex func() int + GetActionType func() string + GetOccurredAt func() int64 + type AppendFile struct + Content []byte + FileName string + func (action *AppendFile) GetActionIndex() int + func (action *AppendFile) GetActionType() string + func (action *AppendFile) GetOccurredAt() int64 + func (appendFile *AppendFile) MarshalJSON() ([]byte, error) + type AsyncRecorder struct + Context context.Context + func NewAsyncRecorder(realRecorder Recorder) *AsyncRecorder + func (recorder *AsyncRecorder) Record(session *Session) + func (recorder *AsyncRecorder) Start() + type CallFromInbound struct + Peer net.TCPAddr + Request []byte + UnixAddr net.UnixAddr + func (action *CallFromInbound) GetActionIndex() int + func (action *CallFromInbound) GetActionType() string + func (action *CallFromInbound) GetOccurredAt() int64 + func (callFromInbound *CallFromInbound) MarshalJSON() ([]byte, error) + type CallOutbound struct + CSpanId []byte + Local *net.TCPAddr + Peer net.TCPAddr + Request []byte + Response []byte + ResponseTime int64 + SocketFD int + UnixAddr net.UnixAddr + func (action *CallOutbound) GetActionIndex() int + func (action *CallOutbound) GetActionType() string + func (action *CallOutbound) GetOccurredAt() int64 + func (callOutbound *CallOutbound) MarshalJSON() ([]byte, error) + type ID [rawLen]byte + func FromString(id string) (ID, error) + func (id *ID) Scan(value interface{}) (err error) + func (id *ID) UnmarshalText(text []byte) error + func (id ID) Counter() int32 + func (id ID) Machine() []byte + func (id ID) MarshalText() ([]byte, error) + func (id ID) Pid() uint16 + func (id ID) String() string + func (id ID) Time() time.Time + func (id ID) Value() (driver.Value, error) + type ReadStorage struct + Content []byte + func (action *ReadStorage) GetActionIndex() int + func (action *ReadStorage) GetActionType() string + func (action *ReadStorage) GetOccurredAt() int64 + func (readStorage *ReadStorage) MarshalJSON() ([]byte, error) + type Recorder interface + Record func(session *Session) + type ReturnInbound struct + Response []byte + func (action *ReturnInbound) GetActionIndex() int + func (action *ReturnInbound) GetActionType() string + func (action *ReturnInbound) GetOccurredAt() int64 + func (returnInbound *ReturnInbound) MarshalJSON() ([]byte, error) + type SendUDP struct + Content []byte + Peer net.UDPAddr + func (action *SendUDP) GetActionIndex() int + func (action *SendUDP) GetActionType() string + func (action *SendUDP) GetOccurredAt() int64 + func (sendUDP *SendUDP) MarshalJSON() ([]byte, error) + type Session struct + Actions []Action + CallFromInbound *CallFromInbound + Context string + NextSessionId string + ReturnInbound *ReturnInbound + SessionId string + SpanId []byte + ThreadId int32 + TraceHeader TraceHeader + TraceId []byte + func NewSession(threadID int32) *Session + func (session *Session) AppendFile(ctx context.Context, content []byte, fileName string) + func (session *Session) HasRequest() bool + func (session *Session) HasResponded() bool + func (session *Session) MarshalJSON() ([]byte, error) + func (session *Session) ReadStorage(ctx context.Context, span []byte) + func (session *Session) RecvFromInbound(ctx context.Context, span []byte, peer net.TCPAddr, unix net.UnixAddr) + func (session *Session) RecvFromOutbound(ctx context.Context, span []byte, peer net.TCPAddr, local *net.TCPAddr, ...) + func (session *Session) SendToInbound(ctx context.Context, span []byte, peer net.TCPAddr) + func (session *Session) SendToOutbound(ctx context.Context, span []byte, peer net.TCPAddr, local *net.TCPAddr, ...) + func (session *Session) SendUDPToOutbound(ctx context.Context, span []byte, peer net.UDPAddr) + func (session *Session) Shutdown(ctx context.Context, newSession *Session) + func (session *Session) Summary(newSession *Session) + type TraceHeader []byte