tapping

package
Version: v0.0.0-...-db3a1d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CfgMonitoringHost = "monitoring.host"
	CfgMonitoringPort = "monitoring.port"
)
View Source
const (
	CfgEnvoyHost     = "envoy.host"
	CfgEnvoyPort     = "envoy.port"
	CfgEnvoyConfigId = "envoy.config_id"
)
View Source
const (
	TapUrl = "/tap"
)

Variables

This section is empty.

Functions

func StartMonitoringServer

func StartMonitoringServer() error

Types

type Message

type Message struct {
	HttpBufferedTrace struct {
		Request  Trace `json:"request,omitempty"`
		Response Trace `json:"response,omitempty"`
	} `json:"http_buffered_trace"`
}

type RequestCollector

type RequestCollector struct {
	// contains filtered or unexported fields
}

func NewRequestCollector

func NewRequestCollector(
	envoyHost string,
	envoyPort int,
	configId string,
	logger feedback.DataLogging,
	prohibitedHeaders []string,
) (*RequestCollector, error)

func (*RequestCollector) TraceRequests

func (rc *RequestCollector) TraceRequests() error

type TapRequest

type TapRequest struct {
	ConfigID  string `yaml:"config_id"`
	TapConfig struct {
		MatchConfig struct {
			HttpRequestHeadersMatch struct {
				Headers []TapRequestHeader `yaml:"headers"`
			} `yaml:"http_request_headers_match"`
		} `yaml:"match_config"`
		OutputConfig struct {
			Sinks              []TapSink `yaml:"sinks"`
			MaxBufferedTxBytes int32     `yaml:"max_buffered_tx_bytes"`
			MaxBufferedRxBytes int32     `yaml:"max_buffered_rx_bytes"`
		} `yaml:"output_config"`
	} `yaml:"tap_config"`
}

type TapRequestHeader

type TapRequestHeader struct {
	Name       string `yaml:"name"`
	RegexMatch string `yaml:"regex_match"`
}

type TapSink

type TapSink struct {
	StreamingAdmin map[string]string `yaml:"streaming_admin"`
}

type Trace

type Trace struct {
	Headers []struct {
		Key   string `json:"key"`
		Value string `json:"value"`
	} `json:"headers"`
	Body struct {
		Truncated bool   `json:"truncated"`
		AsBytes   string `json:"as_bytes"`
	} `json:"body"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL