api

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 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 Client added in v0.5.0

type Client struct {
	// ApiUrl contains the URL to the metal-apiserver
	ApiUrl string `json:"metal_apiserver_url"`
	// Token contains the token for the client
	Token string `json:"metal_hammer_token"`
}

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"`
	NTPServers  []string `json:"ntp_servers,omitempty"`
	Partition   string   `json:"partition"`

	// metal-apiserver related fields
	MetalAPIServerUrl       string `json:"-"`
	MetalAPIServerTokenFile string `json:"-"`
	MetalHammerTenant       string `json:"-"`

	// 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 Deprecated: This mixes up the pixie configuration with server responses, this will be removed once the metal-hammer was fully migrated to V2MetalHammerConfigPayload

type V2MetalHammerConfigPayload added in v0.5.0

type V2MetalHammerConfigPayload struct {
	// Client contains data for initializing the v2 metal-apiserver client
	Client Client `json:"client"`

	// NTPServers to use for synchronize time in the metal-hammer, defaults back to public ntp servers if empty
	NTPServers []string `json:"ntp_servers,omitempty"`
	// Partition used for registering the machine in the metal-hammer
	Partition string `json:"partition"`

	// Logging contains logging configurations passed to metal-hammer
	Logging *Logging `json:"logging,omitempty"`
}

V2MetalHammerConfigPayload contains initial configuration options for the metal-hammer.

Jump to

Keyboard shortcuts

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