auth

package
v0.39.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package auth provides utilities to create a Flow component from OpenTelemetry Collector authentication extensions.

Other OpenTelemetry Collector extensions are better served as generic Flow components rather than being placed in the otelcol namespace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arguments

type Arguments interface {
	component.Arguments

	// Convert converts the Arguments into an OpenTelemetry Collector
	// authentication extension configuration.
	Convert() (otelcomponent.Config, error)

	// Extensions returns the set of extensions that the configured component is
	// allowed to use.
	Extensions() map[otelcomponent.ID]otelextension.Extension

	// Exporters returns the set of exporters that are exposed to the configured
	// component.
	Exporters() map[otelcomponent.DataType]map[otelcomponent.ID]otelcomponent.Component
}

Arguments is an extension of component.Arguments which contains necessary settings for OpenTelemetry Collector authentication extensions.

type Auth

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

Auth is a Flow component shim which manages an OpenTelemetry Collector authentication extension.

func New

func New(opts component.Options, f otelextension.Factory, args Arguments) (*Auth, error)

New creates a new Flow component which encapsulates an OpenTelemetry Collector authentication extension. args must hold a value of the argument type registered with the Flow component.

The registered component must be registered to export the Exports type from this package, otherwise New will panic.

func (*Auth) CurrentHealth

func (a *Auth) CurrentHealth() component.Health

CurrentHealth implements component.HealthComponent.

func (*Auth) Run

func (a *Auth) Run(ctx context.Context) error

Run starts the Auth component.

func (*Auth) Update

func (a *Auth) Update(args component.Arguments) error

Update implements component.Component. It will convert the Arguments into configuration for OpenTelemetry Collector authentication extension configuration and manage the underlying OpenTelemetry Collector extension.

type Exports

type Exports struct {
	// Handler is the managed component. Handler is updated any time the
	// extension is updated.
	Handler Handler `river:"handler,attr"`
}

Exports is a common Exports type for Flow components which expose OpenTelemetry Collector authentication extensions.

type Handler

type Handler struct {
	ID        otelcomponent.ID
	Extension otelextension.Extension
}

Handler combines an extension with its ID.

func (Handler) RiverCapsule

func (Handler) RiverCapsule()

RiverCapsule marks Handler as a capsule type.

Directories

Path Synopsis
Package basic provides an otelcol.auth.basic component.
Package basic provides an otelcol.auth.basic component.
Package bearer provides an otelcol.auth.bearer component.
Package bearer provides an otelcol.auth.bearer component.
Package headers provides an otelcol.auth.headers component.
Package headers provides an otelcol.auth.headers component.

Jump to

Keyboard shortcuts

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