api

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// LogTypeLoki loki is the logging backend
	LogTypeLoki = LogType("loki")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth added in v0.3.1

type BasicAuth struct {
	// User to authenticate against the logging endpoint
	User string `json:"user,omitempty"`
	// Password to authenticate against the logging endpoint
	Password string `json:"password,omitempty"`
}

BasicAuth configuration

type CertificateAuth added in v0.3.1

type CertificateAuth struct {
	// Cert the certificate
	Cert string `json:"cert,omitempty"`
	// Key is the key
	Key string `json:"key,omitempty"`
	// InsecureSkipVerify if no certificate validation should be made
	InsecureSkipVerify bool `json:"insecure_skip_verify,omitempty"`
}

CertificateAuth is used for mTLS authentication

type LogType added in v0.3.1

type LogType string

LogType defines which logging backend should be used

type Logging added in v0.3.1

type Logging struct {
	// Endpoint is the url where the logs must be shipped to
	Endpoint string `json:"endpoint,omitempty"`
	// BasicAuth must be set if loki requires username and password
	BasicAuth *BasicAuth `json:"basic_auth,omitempty"`
	// CertificateAuth must be set if mTLS authentication is required for loki
	CertificateAuth *CertificateAuth `json:"certificate_auth,omitempty"`
	// Type of logging
	Type LogType `json:"log_type,omitempty"`
}

type MetalConfig

type MetalConfig struct {
	Debug       bool   `json:"debug"`
	GRPCAddress string `json:"address,omitempty"`
	MetalAPIUrl string `json:"metal_api_url,omitempty"`
	PixieAPIURL string `json:"pixie_api_url"`
	CACert      string `json:"ca_cert,omitempty"`
	Cert        string `json:"cert,omitempty"`
	Key         string `json:"key,omitempty"`
	HMAC        string `json:"hmac,omitempty"`
	// Logging contains logging configurations passed to metal-hammer
	Logging *Logging `json:"logging,omitempty"`
}

MetalConfig is consumed by metal-hammer to get all options to open a grpc connection to the metal-api

Jump to

Keyboard shortcuts

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