model

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: GPL-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Prometheus PrometheusConfig `mapstructure:"prometheus"`
	Crane      CraneConfig      `mapstructure:"crane"`
	HttpServer HttpServerConfig `mapstructure:"httpServer"`
	CARootPEM  string           `mapstructure:"ca_root_pem"`
	CAFile     string           `mapstructure:"ca_root_file"`
	DevLake    DevLakeConfig    `mapstructure:"devlake"`
}

type CraneConfig

type CraneConfig struct {
	Images_whitelist []string       `mapstructure:"images_whitelist"`
	Registries       []RegistryAuth `mapstructure:"registries"`
}

type DevLakeConfig

type DevLakeConfig struct {
	URL      string `mapstructure:"url"`
	Token    string `mapstructure:"token"`
	Projects []struct {
		ConnectionID int      `mapstructure:"connection_id"`
		Images       []string `mapstructure:"images"`
	} `mapstructure:"projects"`
}

type HttpServerConfig

type HttpServerConfig struct {
	Port string `mapstructure:"port"`
}

HttpServerConfig holds configuration for the HTTP server (e.g., for health probes)

type Image

type Image struct {
	Image_spec string
	Labels     map[string]string
}

An image as returned by Crane - Labels are different then the ones in Prometheus

type ImageMetric

type ImageMetric struct {
	Image_spec string
	Labels     map[string]string
}

A metric as returned by Prometheus, Labels are namespace, cluster and so on.

type OutputWithError

type OutputWithError struct {
	Result any
	Err    error
}

type PrometheusAuth

type PrometheusAuth struct {
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
	Token    string `mapstructure:"token"`
}

type PrometheusConfig

type PrometheusConfig struct {
	URL      string         `mapstructure:"url"`
	Interval string         `mapstructure:"interval"`
	Query    string         `mapstructure:"query"` // Query to fetch image metrics, default:, "kube_pod_container_info"
	Auth     PrometheusAuth `mapstructure:"auth"`  // Deprecated, use crane.registries instead
}

type RegistryAuth

type RegistryAuth struct {
	Registry string `mapstructure:"registry"`
	Username string `mapstructure:"username"`
	Password string `mapstructure:"password"`
}

Jump to

Keyboard shortcuts

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