Documentation
¶
Overview ¶
Package configauth implements the configuration settings to ensure authentication on incoming requests, and allows exporters to add authentication on outgoing requests.
Index ¶
- type Config
- func (a Config) GetGRPCClientAuthenticator(_ context.Context, extensions map[component.ID]component.Component) (extensionauth.GRPCClient, error)
- func (a Config) GetHTTPClientAuthenticator(_ context.Context, extensions map[component.ID]component.Component) (extensionauth.HTTPClient, error)
- func (a Config) GetServerAuthenticator(_ context.Context, extensions map[component.ID]component.Component) (extensionauth.Server, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.126.0
type Config struct { // AuthenticatorID specifies the name of the extension to use in order to authenticate the incoming data point. AuthenticatorID component.ID `mapstructure:"authenticator,omitempty"` // contains filtered or unexported fields }
Config defines the auth settings for the receiver.
func (Config) GetGRPCClientAuthenticator ¶ added in v0.126.0
func (a Config) GetGRPCClientAuthenticator(_ context.Context, extensions map[component.ID]component.Component) (extensionauth.GRPCClient, error)
GetGRPCClientAuthenticator attempts to select the appropriate extensionauth.Client from the list of extensions, based on the component id of the extension. If an authenticator is not found, an error is returned. This should be only used by gRPC clients.
func (Config) GetHTTPClientAuthenticator ¶ added in v0.126.0
func (a Config) GetHTTPClientAuthenticator(_ context.Context, extensions map[component.ID]component.Component) (extensionauth.HTTPClient, error)
GetHTTPClientAuthenticator attempts to select the appropriate extensionauth.Client from the list of extensions, based on the component id of the extension. If an authenticator is not found, an error is returned. This should be only used by HTTP clients.
func (Config) GetServerAuthenticator ¶ added in v0.126.0
func (a Config) GetServerAuthenticator(_ context.Context, extensions map[component.ID]component.Component) (extensionauth.Server, error)
GetServerAuthenticator attempts to select the appropriate extensionauth.Server from the list of extensions, based on the requested extension name. If an authenticator is not found, an error is returned.