Documentation ¶
Index ¶
- Constants
- func FileRecorder(filename string, 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
- type TCPRecorderOption
- type TLSRecorderObject
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(filename string, 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.1.11
type FileRecorderOption ¶
type FileRecorderOption func(opts *fileRecorderOptions)
func SepRecorderOption ¶
func SepRecorderOption(sep string) FileRecorderOption
type HTTPRecorderObject ¶ added in v0.1.11
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.1.11
func HeaderHTTPRecorderOption(header http.Header) HTTPRecorderOption
func TimeoutHTTPRecorderOption ¶
func TimeoutHTTPRecorderOption(timeout time.Duration) HTTPRecorderOption
type HTTPRequestRecorderObject ¶ added in v0.1.12
type HTTPResponseRecorderObject ¶ added in v0.1.12
type HandlerRecorderObject ¶ added in v0.1.11
type HandlerRecorderObject struct { Node string `json:"node,omitempty"` Service string `json:"service"` Network string `json:"network"` RemoteAddr string `json:"remote"` LocalAddr string `json:"local"` Host string `json:"host"` Proto string `json:"proto,omitempty"` ClientIP string `json:"clientIP"` ClientID string `json:"clientID,omitempty"` HTTP *HTTPRecorderObject `json:"http,omitempty"` TLS *TLSRecorderObject `json:"tls,omitempty"` DNS *DNSRecorderObject `json:"dns,omitempty"` Route string `json:"route,omitempty"` InputBytes uint64 `json:"inputBytes"` OutputBytes uint64 `json:"outputBytes"` 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 UsernameRedisRecorderOption ¶ added in v0.1.19
func UsernameRedisRecorderOption(username string) RedisRecorderOption
type TCPRecorderOption ¶
type TCPRecorderOption func(opts *tcpRecorderOptions)
func LogTCPRecorderOption ¶ added in v0.1.11
func LogTCPRecorderOption(log logger.Logger) TCPRecorderOption
func TimeoutTCPRecorderOption ¶
func TimeoutTCPRecorderOption(timeout time.Duration) TCPRecorderOption
type TLSRecorderObject ¶ added in v0.1.17
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"` }
Click to show internal directories.
Click to hide internal directories.