Documentation ¶
Index ¶
- Variables
- func EncodeAnyByteArray(s []byte) json.RawMessage
- type Action
- type AppendFile
- type AsyncRecorder
- type CallFromInbound
- type CallOutbound
- type ReadStorage
- type Recorder
- type ReturnInbound
- type SendUDP
- type Session
- func (session *Session) AppendFile(ctx context.Context, content []byte, fileName string)
- func (session *Session) HasRequest() bool
- func (session *Session) HasResponse() 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
Constants ¶
This section is empty.
Variables ¶
var Recorders = []Recorder{}
Recorders Recorders
var ShouldRecordAction = func(action Action) bool { return true }
ShouldRecordAction ShouldRecordAction
Functions ¶
func EncodeAnyByteArray ¶
func EncodeAnyByteArray(s []byte) json.RawMessage
EncodeAnyByteArray custom Marshal
Types ¶
type AppendFile ¶
AppendFile AppendFile
func (*AppendFile) GetActionIndex ¶
func (action *AppendFile) GetActionIndex() int
func (*AppendFile) GetActionType ¶
func (action *AppendFile) GetActionType() string
func (*AppendFile) GetOccurredAt ¶
func (action *AppendFile) GetOccurredAt() int64
func (*AppendFile) MarshalJSON ¶
func (appendFile *AppendFile) MarshalJSON() ([]byte, error)
MarshalJSON MarshalJSON
type AsyncRecorder ¶
AsyncRecorder AsyncRecorder
func NewAsyncRecorder ¶
func NewAsyncRecorder(realRecorder Recorder) *AsyncRecorder
NewAsyncRecorder NewAsyncRecorder
func (*AsyncRecorder) Record ¶
func (recorder *AsyncRecorder) Record(session *Session)
Record Record
type CallFromInbound ¶
type CallFromInbound struct { Peer net.TCPAddr Request []byte UnixAddr net.UnixAddr // contains filtered or unexported fields }
CallFromInbound Inbound Request
func (*CallFromInbound) GetActionIndex ¶
func (action *CallFromInbound) GetActionIndex() int
func (*CallFromInbound) GetActionType ¶
func (action *CallFromInbound) GetActionType() string
func (*CallFromInbound) GetOccurredAt ¶
func (action *CallFromInbound) GetOccurredAt() int64
func (*CallFromInbound) MarshalJSON ¶
func (callFromInbound *CallFromInbound) MarshalJSON() ([]byte, error)
MarshalJSON MarshalJSON
type CallOutbound ¶
type CallOutbound struct { SocketFD int Peer net.TCPAddr Local *net.TCPAddr `json:"-"` Request []byte ResponseTime int64 Response []byte UnixAddr net.UnixAddr CSpanID []byte `json:"CSpanId"` // contains filtered or unexported fields }
CallOutbound Outbound Request and Response
func (*CallOutbound) GetActionIndex ¶
func (action *CallOutbound) GetActionIndex() int
func (*CallOutbound) GetActionType ¶
func (action *CallOutbound) GetActionType() string
func (*CallOutbound) GetOccurredAt ¶
func (action *CallOutbound) GetOccurredAt() int64
func (*CallOutbound) MarshalJSON ¶
func (callOutbound *CallOutbound) MarshalJSON() ([]byte, error)
MarshalJSON MarshalJSON
type ReadStorage ¶
type ReadStorage struct { Content []byte // contains filtered or unexported fields }
ReadStorage ReadStorage
func (*ReadStorage) GetActionIndex ¶
func (action *ReadStorage) GetActionIndex() int
func (*ReadStorage) GetActionType ¶
func (action *ReadStorage) GetActionType() string
func (*ReadStorage) GetOccurredAt ¶
func (action *ReadStorage) GetOccurredAt() int64
func (*ReadStorage) MarshalJSON ¶
func (readStorage *ReadStorage) MarshalJSON() ([]byte, error)
MarshalJSON MarshalJSON
type ReturnInbound ¶
type ReturnInbound struct { Response []byte // contains filtered or unexported fields }
ReturnInbound Inbound Response
func (*ReturnInbound) GetActionIndex ¶
func (action *ReturnInbound) GetActionIndex() int
func (*ReturnInbound) GetActionType ¶
func (action *ReturnInbound) GetActionType() string
func (*ReturnInbound) GetOccurredAt ¶
func (action *ReturnInbound) GetOccurredAt() int64
func (*ReturnInbound) MarshalJSON ¶
func (returnInbound *ReturnInbound) MarshalJSON() ([]byte, error)
MarshalJSON MarshalJSON
type SendUDP ¶
SendUDP SendUDP
func (*SendUDP) GetActionIndex ¶
func (action *SendUDP) GetActionIndex() int
func (*SendUDP) GetActionType ¶
func (action *SendUDP) GetActionType() string
func (*SendUDP) GetOccurredAt ¶
func (action *SendUDP) GetOccurredAt() int64
func (*SendUDP) MarshalJSON ¶
MarshalJSON MarshalJSON
type Session ¶
type Session struct { Context string `json:"Context"` SessionID string `json:"SessionId"` ThreadID int32 `json:"ThreadId"` TraceHeader TraceHeader `json:"TraceHeader"` TraceID []byte `json:"TraceId"` SpanID []byte `json:"SpanId"` NextSessionID string `json:"NextSessionId"` CallFromInbound *CallFromInbound `json:"CallFromInbound"` ReturnInbound *ReturnInbound `json:"ReturnInbound"` Actions []Action `json:"Actions"` // contains filtered or unexported fields }
Session Session
func (*Session) AppendFile ¶
AppendFile AppendFile
func (*Session) HasResponse ¶ added in v0.0.7
HasResponse has Response
func (*Session) MarshalJSON ¶
MarshalJSON MarshalJSON
func (*Session) ReadStorage ¶
ReadStorage ReadStorage
func (*Session) RecvFromInbound ¶
func (session *Session) RecvFromInbound(ctx context.Context, span []byte, peer net.TCPAddr, unix net.UnixAddr)
RecvFromInbound Inbound Request
func (*Session) RecvFromOutbound ¶
func (session *Session) RecvFromOutbound(ctx context.Context, span []byte, peer net.TCPAddr, local *net.TCPAddr, socketFD int)
RecvFromOutbound Outbound Response
func (*Session) SendToInbound ¶
SendToInbound Inbound Response
func (*Session) SendToOutbound ¶
func (session *Session) SendToOutbound(ctx context.Context, span []byte, peer net.TCPAddr, local *net.TCPAddr, socketFD int)
SendToOutbound Outbound TCP Request
func (*Session) SendUDPToOutbound ¶
SendUDPToOutbound Outbound UDP Request