utils

package
v0.0.0-...-1327c84 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendResponse

func SendResponse(results *[]externaldata.Item, systemErr string, w http.ResponseWriter)

sendResponse sends back the response to Gatekeeper.

Types

type Config

type Config struct {
	Server     ServerConfig     `yaml:"server"`
	Prometheus PrometheusConfig `yaml:"prometheus"`
}
var AppConfig Config

type PrometheusConfig

type PrometheusConfig struct {
	URL      string `yaml:"url"`
	Resource string `yaml:"resource"`
	Query    Query  `yaml:"query"`
}

type Query

type Query struct {
	Memory UsageRequest `yaml:"memory"`
	CPU    UsageRequest `yaml:"cpu"`
}

type ServerConfig

type ServerConfig struct {
	UseHTTPS     bool   `yaml:"useHTTPS"`
	Port         int    `yaml:"port"`
	CertFile     string `yaml:"certFile"`
	KeyFile      string `yaml:"keyFile"`
	ClientCAFile string `yaml:"clientCAFile"`
}

type UsageRequest

type UsageRequest struct {
	Usage   string `yaml:"usage"`
	Request string `yaml:"request"`
}

Jump to

Keyboard shortcuts

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