headers

package
v0.37.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package headers provides an otelcol.auth.headers component.

Index

Constants

This section is empty.

Variables

View Source
var DefaultHeader = Header{
	Action: ActionUpsert,
}

Functions

This section is empty.

Types

type Action added in v0.35.0

type Action string
const (
	ActionInsert Action = "insert"
	ActionUpdate Action = "update"
	ActionUpsert Action = "upsert"
	ActionDelete Action = "delete"
)

func (*Action) Convert added in v0.35.0

Convert the River type to the Otel type. TODO: When headerssetterextension.actionValue is made external, remove the input parameter and make this output the Otel type.

func (*Action) UnmarshalText added in v0.35.0

func (a *Action) UnmarshalText(text []byte) error

func (*Action) Validate added in v0.35.0

func (a *Action) Validate() error

Validate implements river.Validator.

type Arguments

type Arguments struct {
	Headers []Header `river:"header,block,optional"`
}

Arguments configures the otelcol.auth.headers component.

func (Arguments) Convert

func (args Arguments) Convert() (otelcomponent.Config, error)

Convert implements auth.Arguments.

func (Arguments) Exporters

Exporters implements auth.Arguments.

func (Arguments) Extensions

func (args Arguments) Extensions() map[otelcomponent.ID]otelextension.Extension

Extensions implements auth.Arguments.

type Header struct {
	Key         string                     `river:"key,attr"`
	Value       *rivertypes.OptionalSecret `river:"value,attr,optional"`
	FromContext *string                    `river:"from_context,attr,optional"`
	Action      Action                     `river:"action,attr,optional"`
}

Header is an individual Header to send along with requests.

func (*Header) SetToDefault added in v0.35.0

func (h *Header) SetToDefault()

SetToDefault implements river.Defaulter.

func (*Header) Validate added in v0.35.0

func (h *Header) Validate() error

Validate implements river.Validator.

Jump to

Keyboard shortcuts

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