utils

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogTypeShort = log.LstdFlags
	LogType      = log.LstdFlags | log.Lshortfile
)

Variables

This section is empty.

Functions

func GetBoolValue

func GetBoolValue(dataValue, dataName string) (result bool, err error)

func HomeDir

func HomeDir() string

func LogErr

func LogErr(err error)

func PanicErr

func PanicErr(err error)

func ParseTime

func ParseTime(data string) (*int64, error)

func PtrInt64

func PtrInt64(value int64) *int64

func PtrString

func PtrString(value string) *string

nolint deadcode

func RandomString

func RandomString(n int) string

RandomString returns random string of size n

Types

type NamespaceValue

type NamespaceValue struct {
	Namespace, Name string
}

NamespaceValue used to automatically distinct namespace/name string

func (NamespaceValue) MarshalFlag

func (n NamespaceValue) MarshalFlag() (string, error)

MarshalFlag Marshals flag

func (*NamespaceValue) UnmarshalFlag

func (n *NamespaceValue) UnmarshalFlag(value string) error

UnmarshalFlag Unmarshal flag

type OSArgs

type OSArgs struct {
	Version               []bool         `short:"v" long:"version" description:"version"`
	DefaultBackendService NamespaceValue `` /* 131-byte string literal not displayed */
	DefaultCertificate    NamespaceValue `long:"default-ssl-certificate" default:"" description:"secret name of the certificate"`
	ConfigMap             NamespaceValue `long:"configmap" description:"configmap designated for HAProxy" default:"default/haproxy-configmap"`
	ConfigMapTCPServices  NamespaceValue `long:"configmap-tcp-services" description:"configmap used to define tcp services" default:""`
	KubeConfig            string         `long:"kubeconfig" default:"" description:"combined with -e. location of kube config file"`
	NamespaceWhitelist    []string       `long:"namespace-whitelist" description:"whitelisted namespaces"`
	NamespaceBlacklist    []string       `long:"namespace-blacklist" description:"blacklisted namespaces"`
	OutOfCluster          bool           `short:"e" description:"use as out of cluster controller NOTE: experimantal"`
	Test                  bool           `short:"t" description:"simulate running HAProxy"`
	Help                  []bool         `short:"h" long:"help" description:"show this help message"`
	IngressClass          string         `long:"ingress.class" default:"" description:"ingress.class to monitor in multiple controllers environment"`
	PublishService        string         `` /* 205-byte string literal not displayed */
}

OSArgs contains arguments that can be sent to controller

Jump to

Keyboard shortcuts

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