common

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapContains

func MapContains(a, b map[string]string) bool

func Must

func Must(e error)

func MustReturn

func MustReturn[T any](t T, err error) T

func TemplateExecuteForObject

func TemplateExecuteForObject(template *template.Template, obj *unstructured.Unstructured) ([]byte, error)

func TemplateParse

func TemplateParse(str string) *template.Template

Types

type Config

type Config struct {
	EnableLeaderElection bool          `env:"ENABLE_LEADER_ELECTION" envDefault:"false"`
	SyncPeriod           time.Duration `env:"SYNC_PERIOD" envDefault:"24h"`
	WatcherRefreshPeriod time.Duration `env:"WATCHER_REFRESH_PERIOD" envDefault:"15s"`
}

func NewConfig

func NewConfig() *Config

Jump to

Keyboard shortcuts

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