Documentation
¶
Index ¶
- Constants
- func FileRecorder(out io.WriteCloser, opts ...FileRecorderOption) recorder.Recorder
- func HTTPRecorder(url string, opts ...HTTPRecorderOption) recorder.Recorder
- func RedisListRecorder(addr string, opts ...RedisRecorderOption) recorder.Recorder
- func RedisSetRecorder(addr string, opts ...RedisRecorderOption) recorder.Recorder
- func RedisSortedSetRecorder(addr string, opts ...RedisRecorderOption) recorder.Recorder
- func TCPRecorder(addr string, opts ...TCPRecorderOption) recorder.Recorder
- type DNSRecorderObject
- type FileRecorderOption
- type HTTPRecorderObject
- type HTTPRecorderOption
- type HTTPRequestRecorderObject
- type HTTPResponseRecorderObject
- type HandlerRecorderObject
- type RedisRecorderOption
- func DBRedisRecorderOption(db int) RedisRecorderOption
- func KeyRedisRecorderOption(key string) RedisRecorderOption
- func PasswordRedisRecorderOption(password string) RedisRecorderOption
- func RecorderRedisRecorderOption(recorder string) RedisRecorderOption
- func UsernameRedisRecorderOption(username string) RedisRecorderOption
- type TCPRecorderOption
- type TLSRecorderObject
- type WebsocketRecorderObject
Constants ¶
View Source
const ( RecorderServiceHandler = "recorder.service.handler" RecorderServiceHandlerSerial = "recorder.service.handler.serial" RecorderServiceHandlerTunnel = "recorder.service.handler.tunnel" )
Variables ¶
This section is empty.
Functions ¶
func FileRecorder ¶
func FileRecorder(out io.WriteCloser, opts ...FileRecorderOption) recorder.Recorder
FileRecorder records data to file.
func HTTPRecorder ¶
func HTTPRecorder(url string, opts ...HTTPRecorderOption) recorder.Recorder
HTTPRecorder records data to HTTP service.
func RedisListRecorder ¶
func RedisListRecorder(addr string, opts ...RedisRecorderOption) recorder.Recorder
RedisListRecorder records data to a redis list.
func RedisSetRecorder ¶
func RedisSetRecorder(addr string, opts ...RedisRecorderOption) recorder.Recorder
RedisSetRecorder records data to a redis set.
func RedisSortedSetRecorder ¶
func RedisSortedSetRecorder(addr string, opts ...RedisRecorderOption) recorder.Recorder
RedisSortedSetRecorder records data to a redis sorted set.
func TCPRecorder ¶
func TCPRecorder(addr string, opts ...TCPRecorderOption) recorder.Recorder
TCPRecorder records data to TCP service.
Types ¶
type DNSRecorderObject ¶ added in v0.0.3
type FileRecorderOption ¶
type FileRecorderOption func(opts *fileRecorderOptions)
func RecorderFileRecorderOption ¶ added in v0.0.3
func RecorderFileRecorderOption(recorder string) FileRecorderOption
func SepFileRecorderOption ¶ added in v0.0.3
func SepFileRecorderOption(sep string) FileRecorderOption
type HTTPRecorderObject ¶ added in v0.0.3
type HTTPRecorderObject struct {
Host string `json:"host"`
Method string `json:"method"`
Proto string `json:"proto"`
Scheme string `json:"scheme"`
URI string `json:"uri"`
StatusCode int `json:"statusCode"`
Request HTTPRequestRecorderObject `json:"request"`
Response HTTPResponseRecorderObject `json:"response"`
}
type HTTPRecorderOption ¶
type HTTPRecorderOption func(opts *httpRecorderOptions)
func HeaderHTTPRecorderOption ¶ added in v0.0.3
func HeaderHTTPRecorderOption(header http.Header) HTTPRecorderOption
func RecorderHTTPRecorderOption ¶ added in v0.0.3
func RecorderHTTPRecorderOption(recorder string) HTTPRecorderOption
func TimeoutHTTPRecorderOption ¶
func TimeoutHTTPRecorderOption(timeout time.Duration) HTTPRecorderOption
type HTTPRequestRecorderObject ¶ added in v0.0.3
type HTTPResponseRecorderObject ¶ added in v0.0.3
type HandlerRecorderObject ¶ added in v0.0.3
type HandlerRecorderObject struct {
Node string `json:"node,omitempty"`
Service string `json:"service"`
Network string `json:"network"`
RemoteAddr string `json:"remote"`
LocalAddr string `json:"local"`
ClientAddr string `json:"client"`
SrcAddr string `json:"src"`
DstAddr string `json:"dst"`
Host string `json:"host"`
Proto string `json:"proto,omitempty"`
ClientIP string `json:"clientIP"`
ClientID string `json:"clientID,omitempty"`
HTTP *HTTPRecorderObject `json:"http,omitempty"`
Websocket *WebsocketRecorderObject `json:"websocket,omitempty"`
TLS *TLSRecorderObject `json:"tls,omitempty"`
DNS *DNSRecorderObject `json:"dns,omitempty"`
Route string `json:"route,omitempty"`
InputBytes uint64 `json:"inputBytes"`
OutputBytes uint64 `json:"outputBytes"`
Redirect string `json:"redirect,omitempty"`
Err string `json:"err,omitempty"`
SID string `json:"sid"`
Duration time.Duration `json:"duration"`
Time time.Time `json:"time"`
}
type RedisRecorderOption ¶
type RedisRecorderOption func(opts *redisRecorderOptions)
func DBRedisRecorderOption ¶
func DBRedisRecorderOption(db int) RedisRecorderOption
func KeyRedisRecorderOption ¶
func KeyRedisRecorderOption(key string) RedisRecorderOption
func PasswordRedisRecorderOption ¶
func PasswordRedisRecorderOption(password string) RedisRecorderOption
func RecorderRedisRecorderOption ¶ added in v0.0.3
func RecorderRedisRecorderOption(recorder string) RedisRecorderOption
func UsernameRedisRecorderOption ¶ added in v0.0.3
func UsernameRedisRecorderOption(username string) RedisRecorderOption
type TCPRecorderOption ¶
type TCPRecorderOption func(opts *tcpRecorderOptions)
func LogTCPRecorderOption ¶ added in v0.0.3
func LogTCPRecorderOption(log logger.Logger) TCPRecorderOption
func RecorderTCPRecorderOption ¶ added in v0.0.3
func RecorderTCPRecorderOption(recorder string) TCPRecorderOption
func TimeoutTCPRecorderOption ¶
func TimeoutTCPRecorderOption(timeout time.Duration) TCPRecorderOption
type TLSRecorderObject ¶ added in v0.0.3
type TLSRecorderObject struct {
ServerName string `json:"serverName"`
CipherSuite string `json:"cipherSuite"`
CompressionMethod uint8 `json:"compressionMethod"`
Proto string `json:"proto"`
Version string `json:"version"`
ClientHello string `json:"clientHello"`
ServerHello string `json:"serverHello"`
}
type WebsocketRecorderObject ¶ added in v0.0.3
type WebsocketRecorderObject struct {
From string `json:"from"`
Fin bool `json:"fin"`
Rsv1 bool `json:"rsv1"`
Rsv2 bool `json:"rsv2"`
Rsv3 bool `json:"rsv3"`
OpCode int `json:"opcode"`
Masked bool `json:"masked"`
MaskKey uint32 `json:"maskKey"`
Length int64 `json:"length"`
Payload []byte `json:"payload"`
}
Click to show internal directories.
Click to hide internal directories.