utils

package
v0.0.0-...-696ba86 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultBackoff = retry.DefaultBackoff
	DefaultRetry   = retry.DefaultRetry
	ErrInvalidFunc = goerrors.New("invalid function")
)

Functions

func GetGitURL

func GetGitURL(name, namespace, repoName string, useProxy bool) (*url.URL, error)

func GetSvcURL

func GetSvcURL(name, namespace string, useProxy bool) (*url.URL, error)

func OnTimeout

func OnTimeout(backoff wait.Backoff, fn func() error, log *logrus.Entry) error

func PrettyMarshall

func PrettyMarshall(object interface{}) (string, error)

func RetryOnConflict

func RetryOnConflict(backoff wait.Backoff, fn func() error, log *logrus.Entry) error

func WithIgnoreOnConflict

func WithIgnoreOnConflict(backoff wait.Backoff, fn func() error, log *logrus.Entry) error

func WithIgnoreOnNotFound

func WithIgnoreOnNotFound(backoff wait.Backoff, fn func() error, log *logrus.Entry) error

Types

type Container

type Container struct {
	DynamicCli  dynamic.Interface
	Namespace   string
	WaitTimeout time.Duration
	Verbose     bool
	Log         *logrus.Entry
}

func (Container) WithLogger

func (c Container) WithLogger(l *logrus.Entry) Container

type Poller

type Poller struct {
	MaxPollingTime     time.Duration
	InsecureSkipVerify bool
	Log                *logrus.Entry
	DataKey            string
}

func (Poller) PollForAnswer

func (p Poller) PollForAnswer(url, payloadStr, expected string) error

func (Poller) WithLogger

func (p Poller) WithLogger(l *logrus.Entry) Poller

Jump to

Keyboard shortcuts

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