common

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 7 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 Pointer

func Pointer[T any](t T) *T

func TemplateExecuteForObject

func TemplateExecuteForObject(template *template.Template, obj client.Object) ([]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