config

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDeploymentJson

func GetDeploymentJson(sinkId, sinkUrl, sinkUsername, sinkPassword string) (string, error)

func ReturnConfigYamlFromSink

func ReturnConfigYamlFromSink(_ context.Context, kafkaUrlConfig, sinkId, sinkUrl, sinkUsername, sinkPassword string) (string, error)

ReturnConfigYamlFromSink this is the main method, which will generate the YAML file from the

Types

type BasicAuthenticationExtension

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

type Exporters

type Exporters struct {
	PrometheusRemoteWrite *PrometheusRemoteWriteExporterConfig `json:"prometheusremotewrite,omitempty" yaml:"prometheusremotewrite,omitempty"`
}

type Extensions

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

type HealthCheckExtension

type HealthCheckExtension struct {
	CollectorPipeline *struct {
		Enabled          bool   `json:"enabled" yaml:"enabled"`
		Interval         string `json:"interval" yaml:"interval"`
		FailureThreshold int32  `json:"exporter_failure_threshold" yaml:"exporter_failure_threshold"`
	} `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 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 PrometheusRemoteWriteExporterConfig

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

type PrometheusState

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

func (*PrometheusState) Scan

func (p *PrometheusState) Scan(value interface{}) 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"`
	Url             string          `json:"remote_host"`
	User            string          `json:"username"`
	Password        string          `json:"password"`
	OpenTelemetry   string          `json:"opentelemetry"`
	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