httpforwarder

package module
v0.95.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

README

HTTP Forwarder Extension

This extension is deprecated. Please use httpforwarderextension instead.

Status
Stability deprecated
Distributions contrib, splunk, sumo
Issues Open issues Closed issues
Code Owners @atoulme, @rmfitzpatrick

This extension accepts HTTP requests, optionally adds headers to them and forwards them. The RequestURIs of the original requests are preserved by the extension.

Configuration

The following settings are required:

  • egress: HTTP config settings to use for forwarding requests.
    • endpoint (no default): The target to which requests should be forwarded to.

The following settings can be optionally configured:

  • ingress: HTTP config settings for HTTP server listening to requests.
    • endpoint (default = 0.0.0.0:6060): The host to which requests should be forwarded to.
  • egress: HTTP config settings to use for forwarding requests.
    • headers (default = nil): Additional headers to be added to all requests passing through the extension.
    • timeout (default = 10s): How long to wait for each request to complete.
Example
  http_forwarder:
    ingress:
      endpoint: localhost:7070
    egress:
      endpoint: http://target/
      headers:
        otel_http_forwarder: dev
      timeout: 5s

The full list of settings exposed for this exporter are documented here with detailed sample configurations here.

Documentation

Overview

Package httpforwarder accepts HTTP requests, optionally adds headers to them and forwards them. Deprecated: use httpforwarderextension instead

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() extension.Factory

NewFactory creates a factory for HostObserver extension.

Types

type Config

type Config struct {

	// Ingress holds config settings for HTTP server listening for requests.
	Ingress confighttp.ServerConfig `mapstructure:"ingress"`

	// Egress holds config settings to use for forwarded requests.
	Egress confighttp.ClientConfig `mapstructure:"egress"`
}

Config defines configuration for http forwarder extension.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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