utils

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(list []string, s string) bool

Contains will check if search string is in slice

func MustGetEnv

func MustGetEnv(name string) string

MustGetEnv would get Env variable of die

func MustGetEnvInt

func MustGetEnvInt(name string) int

MustGetEnvInt would get Env variable, make int from it of die

func PatchVaultSecret

func PatchVaultSecret(ctx context.Context, cl client.Client, before *xov1alpha1.VaultSecret, after *xov1alpha1.VaultSecret) error

Patch would patch runtime Object

Types

type Responce2Req

type Responce2Req struct {
	RequestURI   string
	ResponceCode int
	Delay        int
	Responce     string
}

type TestDoer

type TestDoer struct {
	R2rChan chan Responce2Req
}

func MakeTestHTTPServer

func MakeTestHTTPServer(t *testing.T, queueDepth int) (*api.Config, net.Listener, *TestDoer)

MakeTestHTTPServer creates a test HTTP server that handles requests until the listener returned is closed.

func NewTestDoer

func NewTestDoer(requestNums int) *TestDoer

func (*TestDoer) Close

func (t *TestDoer) Close()

Jump to

Keyboard shortcuts

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