Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthConfig ¶ added in v0.14.0
type AuthConfig struct { // > @3@4@5@6 // > // > Override default Authorization header Header string `json:"header" default:"Authorization"` // * // > @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 CORSConfig ¶ added in v0.27.0
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"` // * // > @3@4@5@6 // > // > Meta params // > // > Add meta information to an event (look at Meta params) // > Use [go-template](https://pkg.go.dev/text/template) syntax // > // > Example: “`user_agent: '{{ index (index .request.Header "User-Agent") 0}}'“` Meta cfg.MetaTemplates `json:"meta"` // * // > @3@4@5@6 // > // > CORS config. // > Allowed origins support only one wildcard symbol. `http://*.example.com` - valid, `http://*.example.*.com` - invalid. // > See CORSConfig for details. CORS CORSConfig `json:"cors" 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) ServeHTTP ¶ added in v0.14.0
func (p *Plugin) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.