Documentation
¶
Overview ¶
Package export forwards observed HTTP traffic to an HTTP collector.
Wrap returns an output.Writer that also implements Capture. Engines call Capture with every exchange they observe, before scope, dedupe and omit filters; exchanges are POSTed asynchronously as JSON batches so crawling never blocks on the collector. It is enabled only when KATANA_TRAFFIC_ENDPOINT and KATANA_TRAFFIC_TOKEN are set.
Index ¶
Constants ¶
const ( EnvEndpoint = "KATANA_TRAFFIC_ENDPOINT" EnvToken = "KATANA_TRAFFIC_TOKEN" EnvAttributes = "KATANA_TRAFFIC_ATTRIBUTES" EnvAllowInsecure = "KATANA_TRAFFIC_ALLOW_INSECURE" // EnvIncludeCredentials set to 1 exports credential headers verbatim. EnvIncludeCredentials = "KATANA_TRAFFIC_INCLUDE_CREDENTIALS" )
Variables ¶
This section is empty.
Functions ¶
func Enabled ¶
func Enabled() bool
Enabled reports whether traffic export is configured in the environment, even partially.
Types ¶
type Config ¶
type Config struct {
Endpoint string
Token string
Attributes map[string]string
AllowInsecure bool
// IncludeCredentials exports credential headers instead of redacting them.
IncludeCredentials bool
HTTPClient *http.Client
}
Config controls an exporter. Endpoint and Token must come from trusted process configuration, never from crawled content.