util

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the blessclient version
	Version = "undefined"
	// GitSha is the gitsha used to build this version
	GitSha = "undefined"
	// Release is true if this is a release
	Release = "false"
	// Dirty if git is dirty
	Dirty = "true"
)

Functions

func CheckLatestVersion added in v0.3.2

func CheckLatestVersion(ctx context.Context, owner string, repo string) error

CheckLatestVersion checks to see if we're on the latest version

func GetConfigPath added in v0.3.2

func GetConfigPath(cmd *cobra.Command) (string, error)

GetConfigPath gets the config path from a cobra cmd

func VersionCacheKey

func VersionCacheKey() string

VersionCacheKey returns a key to version the cache

func VersionString

func VersionString() (string, error)

VersionString returns the version string

Types

type Lock added in v0.3.2

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

Lock represents a pid lock

func NewLock added in v0.3.2

func NewLock(configPath string) (*Lock, error)

NewLock returns a new lock

func (*Lock) Lock added in v0.3.2

func (l *Lock) Lock(optBackoff ...backoff.BackOff) error

Lock will lock with retries.

func (*Lock) Unlock added in v0.3.2

func (l *Lock) Unlock() error

Unlock will unlock the pid lockfile

Jump to

Keyboard shortcuts

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