http

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: BSD-3-Clause Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory() (pipeline.AnyPlugin, pipeline.AnyConfig)

Types

type AuthConfig added in v0.14.0

type AuthConfig struct {
	// > @3@4@5@6
	// >
	// > AuthStrategy.Strategy describes strategy to use.
	Strategy  string `json:"strategy" default:"disabled" options:"disabled|basic|bearer"` // *
	Strategy_ AuthStrategy
	// > @3@4@5@6
	// >
	// > AuthStrategy.Secrets describes secrets in key-value format.
	// > If the `strategy` is basic, then the key is the login, the value is the password.
	// > If the `strategy` is bearer, then the key is the name, the value is the Bearer token.
	// > Key uses in the http_input_total metric.
	Secrets map[string]string `json:"secrets"` // *
}

! config-params ^ config-params

type AuthStrategy added in v0.14.0

type AuthStrategy byte
const (
	StrategyDisabled AuthStrategy = iota
	StrategyBasic
	StrategyBearer
)

type Config

type Config struct {
	// > @3@4@5@6
	// >
	// > An address to listen to. Omit ip/host to listen all network interfaces. E.g. `:88`
	Address string `json:"address" default:":9200"` // *
	// > @3@4@5@6
	// >
	// > Which protocol to emulate.
	EmulateMode  string `json:"emulate_mode" default:"no" options:"no|elasticsearch"` // *
	EmulateMode_ EmulateMode
	// > @3@4@5@6
	// >
	// > CA certificate in PEM encoding. This can be a path or the content of the certificate.
	// > If both ca_cert and private_key are set, the server starts accepting connections in TLS mode.
	CACert string `json:"ca_cert" default:""` // *
	// > @3@4@5@6
	// >
	// > CA private key in PEM encoding. This can be a path or the content of the key.
	// > If both ca_cert and private_key are set, the server starts accepting connections in TLS mode.
	PrivateKey string `json:"private_key" default:""` // *

	// > @3@4@5@6
	// >
	// > Auth config.
	// > Disabled by default.
	// > See AuthConfig for details.
	// > You can use 'warn' log level for logging authorizations.
	Auth AuthConfig `json:"auth" child:"true"` // *
}

! config-params ^ config-params

type EmulateMode added in v0.14.0

type EmulateMode byte
const (
	EmulateModeNo EmulateMode = iota
	EmulateModeElasticSearch
)

type Plugin

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

func (*Plugin) Commit

func (p *Plugin) Commit(_ *pipeline.Event)

func (*Plugin) PassEvent added in v0.6.5

func (p *Plugin) PassEvent(_ *pipeline.Event) bool

PassEvent decides pass or discard event.

func (*Plugin) ServeHTTP added in v0.14.0

func (p *Plugin) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Plugin) Start

func (p *Plugin) Start(config pipeline.AnyConfig, params *pipeline.InputPluginParams)

func (*Plugin) Stop

func (p *Plugin) Stop()

Jump to

Keyboard shortcuts

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