util

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ReclaimSpaceTimeoutKey     = "reclaim-space-timeout"
	MaxConcurrentReconcilesKey = "max-concurrent-reconciles"
)

Variables

This section is empty.

Functions

func ContainsInSlice

func ContainsInSlice(slice []string, s string) bool

ConstainsInSlice find given string in given slice.

func GetErrorMessage

func GetErrorMessage(err error) string

GetErrorMessage returns the message from the error if it is a grpc error, else returns err.Error().

func IsUnimplementedError added in v0.6.0

func IsUnimplementedError(err error) bool

IsUnimplementedError returns true if the error is Unimplemented error.

func RemoveFromSlice

func RemoveFromSlice(slice []string, s string) []string

RemoveFromSlice removes given string from given slice.

Types

type Config added in v0.7.0

type Config struct {
	Namespace               string
	ReclaimSpaceTimeout     time.Duration
	MaxConcurrentReconciles int
}

Config holds the configuration options that can be overrrided via a config file.

func NewConfig added in v0.7.0

func NewConfig() Config

NewConfig returns a new Config object with default values.

func (*Config) ReadConfigMap added in v0.7.0

func (cfg *Config) ReadConfigMap(ctx context.Context, kubeClient *kubernetes.Clientset) error

ReadConfigFile fetches the config file and updates the config options with values read from the config map.

Jump to

Keyboard shortcuts

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