util

package
v1.7.14 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 4 Imported by: 247

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSignature added in v0.6.0

func MakeSignature(size int) ([]byte, error)

MakeSignature generates a cryptographically-secure pseudo-random token, based on a given number of random bytes, for signing purposes.

func Wait added in v0.4.1

func Wait(timeout uint, f func(chan<- bool)) bool

Wait takes a check interval and timeout and waits for a function to return `true`. Wait will return `true` on success and `false` on timeout. The passed function, in turn, should pass `true` (or anything, really) to the channel when it's done. Pass `0` as the timeout to run infinitely until completion.

Types

type KeyLock

type KeyLock struct {
	// contains filtered or unexported fields
}

Allows to lock by string key

func NewKeyLock

func NewKeyLock() *KeyLock

NewKeyLock creates new instance of KeyLock

func (*KeyLock) Lock

func (keyLock *KeyLock) Lock(key string)

Lock blocks goroutine using key specific mutex

func (*KeyLock) Unlock

func (keyLock *KeyLock) Unlock(key string)

Unlock releases key specific mutex

Directories

Path Synopsis
app
normalizers
Code generated by github.com/argoproj/argo-cd/hack/known_types.
Code generated by github.com/argoproj/argo-cd/hack/known_types.
Utility functions for managing HTTPS server certificates and SSH known host entries for ArgoCD
Utility functions for managing HTTPS server certificates and SSH known host entries for ArgoCD
db
git
jwt
zjwt
The package provides a way to create compact JWTs, "zJWT".
The package provides a way to create compact JWTs, "zJWT".

Jump to

Keyboard shortcuts

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