config

package
v0.0.0-...-8848f5d Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 2 Imported by: 1 module, 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 Opts

type Opts struct {
	Version struct {
		Version  bool    `long:"version" description:"Show version"`
		Template *string `long:"version.template" description:"Version go template, eg {{.Version}}"`
	}

	// logger
	Logger struct {
		Level string `` // nolint:staticcheck // multiple choices are ok
		/* 152-byte string literal not displayed */
		Format string `long:"log.format"   env:"LOG_FORMAT"  description:"Log format" choice:"logfmt" choice:"json" default:"logfmt"` // nolint:staticcheck // multiple choices are ok
		Source string ``                                                                                                              // nolint:staticcheck // multiple choices are ok
		/* 177-byte string literal not displayed */
		Color string `long:"log.color"    env:"LOG_COLOR"   description:"Enable color for logs" choice:"" choice:"auto" choice:"yes" choice:"no"` // nolint:staticcheck // multiple choices are ok
		Time  bool   `long:"log.time"     env:"LOG_TIME"    description:"Show log time"`
	}

	Janitor struct {
		Interval time.Duration `long:"interval"    env:"JANITOR_INTERVAL"  description:"Janitor interval (time.duration)"  default:"1h"`
		Config   string        `long:"config"      env:"JANITOR_CONFIG"    description:"Path to kube-janitor config file" required:"true"`
		DryRun   bool          `long:"dry-run"     env:"JANITOR_DRYRUN"    description:"Dry run (no delete)"`
		Once     bool          `long:"once"        env:"JANITOR_ONCE"      description:"Run once and exit"`
	}

	// kubernetes settings
	Kubernetes struct {
		Config       string `` /* 128-byte string literal not displayed */
		ItemsPerPage int64  `` /* 142-byte string literal not displayed */
	}

	// general options
	Server struct {
		// general options
		Bind         string        `long:"server.bind"              env:"SERVER_BIND"           description:"Server address"        default:":8080"`
		ReadTimeout  time.Duration `long:"server.timeout.read"      env:"SERVER_TIMEOUT_READ"   description:"Server read timeout"   default:"5s"`
		WriteTimeout time.Duration `long:"server.timeout.write"     env:"SERVER_TIMEOUT_WRITE"  description:"Server write timeout"  default:"10s"`
	}
}

func (*Opts) GetJson

func (o *Opts) GetJson() []byte

Jump to

Keyboard shortcuts

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