config

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AuthenticationKey = "authentication"

Variables

View Source
var JsonConfigMap = `` /* 186-byte string literal not displayed */
View Source
var JsonDeployment = `` /* 3358-byte string literal not displayed */
View Source
var JsonService = `` /* 573-byte string literal not displayed */

Functions

This section is empty.

Types

type Auth added in v0.26.0

type Auth struct {
	Authenticator string `json:"authenticator" yaml:"authenticator"`
}

type AuthBuilderService added in v0.26.0

type AuthBuilderService interface {
	GetExtensionsFromMetadata(config types.Metadata) (Extensions, string)
	DecodeAuth(config types.Metadata) (types.Metadata, error)
	EncodeAuth(config types.Metadata) (types.Metadata, error)
}

func GetAuthService added in v0.26.0

func GetAuthService(authType string, service password.EncryptionService) AuthBuilderService

type BasicAuthBuilder added in v0.26.0

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

func (*BasicAuthBuilder) DecodeAuth added in v0.29.0

func (b *BasicAuthBuilder) DecodeAuth(config types.Metadata) (types.Metadata, error)

func (*BasicAuthBuilder) EncodeAuth added in v0.29.0

func (b *BasicAuthBuilder) EncodeAuth(config types.Metadata) (types.Metadata, error)

func (*BasicAuthBuilder) GetExtensionsFromMetadata added in v0.26.0

func (b *BasicAuthBuilder) GetExtensionsFromMetadata(c types.Metadata) (Extensions, string)

type BasicAuthenticationExtension

type BasicAuthenticationExtension struct {
	ClientAuth *ClientAuth `json:"client_auth" yaml:"client_auth"`
}

type BearerAuthExtension

type BearerAuthExtension struct {
	BearerAuth *struct {
		Token string `json:"token" yaml:"token"`
	} `json:"client_auth" yaml:"client_auth"`
}

type ClientAuth added in v0.26.0

type ClientAuth struct {
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
}

type CollectorPipelineExtension

type CollectorPipelineExtension struct {
	Enabled          string `json:"enabled" yaml:"enabled"`
	Interval         string `json:"interval" yaml:"interval"`
	FailureThreshold int32  `json:"exporter_failure_threshold" yaml:"exporter_failure_threshold"`
}

type ConfigBuilder added in v0.29.0

type ConfigBuilder interface {
	BuildDeploymentConfig(deployment *DeploymentRequest) (string, error)
}

func NewConfigBuilder added in v0.29.0

func NewConfigBuilder(logger *zap.Logger, kafkaUrl string, encryptionService password.EncryptionService) ConfigBuilder

type DeploymentRequest added in v0.29.0

type DeploymentRequest struct {
	OwnerID string
	SinkID  string
	Config  types.Metadata
	Backend string
	Status  string
}

type ExporterConfigService added in v0.26.0

type ExporterConfigService interface {
	GetExportersFromMetadata(config types.Metadata, authenticationExtensionName string) (Exporters, string)
}

func FromStrategy added in v0.26.0

func FromStrategy(backend string) ExporterConfigService

type Exporters

type Exporters struct {
	PrometheusRemoteWrite *PrometheusRemoteWriteExporterConfig `json:"prometheusremotewrite,omitempty" yaml:"prometheusremotewrite,omitempty"`
	OTLPExporter          *OTLPExporterConfig                  `json:"otlphttp,omitempty" yaml:"otlphttp,omitempty"`
	LoggingExporter       *LoggingExporterConfig               `json:"logging,omitempty" yaml:"logging,omitempty"`
}

type Extensions

type Extensions struct {
	HealthCheckExtConfig *HealthCheckExtension `json:"health_check,omitempty" yaml:"health_check,omitempty" :"health_check_ext_config"`
	PProf                *PProfExtension       `json:"pprof,omitempty" yaml:"pprof,omitempty" :"p_prof"`
	ZPages               *ZPagesExtension      `json:"zpages,omitempty" yaml:"zpages,omitempty" :"z_pages"`
	// Exporters Authentication
	BasicAuth *BasicAuthenticationExtension `json:"basicauth/exporter,omitempty" yaml:"basicauth/exporter,omitempty" :"basic_auth"`
}

type HealthCheckExtension

type HealthCheckExtension struct {
	Endpoint          string                      `json:"endpoint" yaml:"endpoint"`
	Path              string                      `json:"path" yaml:"path"`
	CollectorPipeline *CollectorPipelineExtension `json:"check_collector_pipeline,omitempty" yaml:"check_collector_pipeline,omitempty"`
}

type KafkaReceiver

type KafkaReceiver struct {
	Brokers         []string `json:"brokers" yaml:"brokers"`
	Topic           string   `json:"topic" yaml:"topic"`
	ProtocolVersion string   `json:"protocol_version" yaml:"protocol_version"`
}

type LoggingExporterConfig

type LoggingExporterConfig struct {
	Verbosity          string `json:"verbosity,omitempty" yaml:"verbosity,omitempty"`
	SamplingInitial    int    `json:"sampling_initial,omitempty" yaml:"sampling_initial,omitempty"`
	SamplingThereAfter int    `json:"sampling_thereafter,omitempty" yaml:"sampling_thereafter,omitempty"`
}

type OTLPExporterConfig added in v0.26.0

type OTLPExporterConfig struct {
	Endpoint string                 `json:"endpoint" yaml:"endpoint"`
	Headers  map[string]interface{} `json:"headers,omitempty" yaml:"headers,omitempty"`
	Auth     struct {
		Authenticator string `json:"authenticator" yaml:"authenticator"`
	}
}

type OTLPHTTPExporterBuilder added in v0.26.0

type OTLPHTTPExporterBuilder struct {
}

func (*OTLPHTTPExporterBuilder) GetExportersFromMetadata added in v0.26.0

func (O *OTLPHTTPExporterBuilder) GetExportersFromMetadata(config types.Metadata, authenticationExtensionName string) (Exporters, string)

type OtelConfigFile

type OtelConfigFile struct {
	Receivers  Receivers     `json:"receivers" yaml:"receivers"`
	Processors *Processors   `json:"processors,omitempty" yaml:"processors,omitempty"`
	Extensions *Extensions   `json:"extensions,omitempty" yaml:"extensions,omitempty"`
	Exporters  Exporters     `json:"exporters" yaml:"exporters"`
	Service    ServiceConfig `json:"service" yaml:"service"`
}

type PProfExtension

type PProfExtension struct {
	Endpoint string `json:"endpoint" yaml:"endpoint"`
}

type Processors

type Processors struct {
}

type PrometheusExporterConfig added in v0.26.0

type PrometheusExporterConfig struct {
}

func (*PrometheusExporterConfig) GetExportersFromMetadata added in v0.26.0

func (p *PrometheusExporterConfig) GetExportersFromMetadata(config types.Metadata, authenticationExtensionName string) (Exporters, string)

type PrometheusRemoteWriteExporterConfig

type PrometheusRemoteWriteExporterConfig struct {
	Endpoint string                 `json:"endpoint" yaml:"endpoint"`
	Headers  map[string]interface{} `json:"headers,omitempty" yaml:"headers,omitempty"`
	Auth     struct {
		Authenticator string `json:"authenticator" yaml:"authenticator"`
	}
}

type PrometheusState

type PrometheusState int
const (
	Unknown PrometheusState = iota
	Active
	Error
	Idle
	Warning
)

func (*PrometheusState) SetFromString

func (p *PrometheusState) SetFromString(value string) error

func (PrometheusState) String

func (p PrometheusState) String() string

func (PrometheusState) Value

func (p PrometheusState) Value() (driver.Value, error)

type Receivers

type Receivers struct {
	Kafka KafkaReceiver `json:"kafka" yaml:"kafka"`
}

Receivers will receive only with Kafka for now

type ServiceConfig

type ServiceConfig struct {
	Extensions []string `json:"extensions,omitempty" yaml:"extensions,omitempty"`
	Pipelines  struct {
		Metrics struct {
			Receivers  []string `json:"receivers" yaml:"receivers"`
			Processors []string `json:"processors,omitempty" yaml:"processors,omitempty"`
			Exporters  []string `json:"exporters" yaml:"exporters"`
		} `json:"metrics" yaml:"metrics"`
	} `json:"pipelines" yaml:"pipelines"`
}

type SinkData

type SinkData struct {
	SinkID          string          `json:"sink_id"`
	OwnerID         string          `json:"owner_id"`
	Backend         string          `json:"backend"`
	Config          types.Metadata  `json:"config"`
	State           PrometheusState `json:"state,omitempty"`
	Msg             string          `json:"msg,omitempty"`
	LastRemoteWrite time.Time       `json:"last_remote_write,omitempty"`
}

type ZPagesExtension

type ZPagesExtension struct {
	Endpoint string `json:"endpoint" yaml:"endpoint"`
}

Jump to

Keyboard shortcuts

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