Documentation
¶
Index ¶
Constants ¶
View Source
const SchemaVersion string = "v1"
View Source
const UnknownAddr = "unknown"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionStatsContainer ¶
type ConnectionStatsContainer struct { ClientAddress string `json:"client_address"` Method string `json:"method"` URL string `json:"url"` ResponseCode int `json:"response_code"` ContentLength int `json:"content_length"` Duration int64 `json:"duration_ms"` ResponseContentType string `json:"response_content_type,omitempty"` ProxyID string `json:"proxy_id,omitempty"` }
func NewConnectionStatusContainerWithDuration ¶
func NewConnectionStatusContainerWithDuration(f px.Flow, doneAt int64) *ConnectionStatsContainer
NewConnectionStatusContainerWithDuration is a slightly leaky abstraction, the doneAt param is for logging the entire session length, and comes from the proxy addon layer.
func (*ConnectionStatsContainer) ToJSON ¶
func (obj *ConnectionStatsContainer) ToJSON() []byte
func (*ConnectionStatsContainer) ToJSONstr ¶
func (obj *ConnectionStatsContainer) ToJSONstr() string
type LogDumpContainer ¶
type LogDumpContainer struct { SchemaVersion string `json:"schema,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` ConnectionStats *ConnectionStatsContainer `json:"connection_stats,omitempty"` Request *TrafficObject `json:"request,omitempty"` Response *TrafficObject `json:"response,omitempty"` // contains filtered or unexported fields }
LogDumpContainer holds the request and response data for a given flow
func NewLogDumpContainer ¶
func NewLogDumpContainer(f px.Flow, logSources config.LogSourceConfig, doneAt int64, filterReqHeaders, filterRespHeaders []string) *LogDumpContainer
NewLogDumpContainer returns a LogDumpContainer with *only* the fields requested in logSources populated
type TrafficObject ¶
type TrafficObject struct { Headers http.Header `json:"headers"` Body string `json:"body"` // contains filtered or unexported fields }
func (*TrafficObject) HeadersString ¶
func (t *TrafficObject) HeadersString() string
HeadersString returns the headers as a flat string
Click to show internal directories.
Click to hide internal directories.