beaconutil

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddressEnv        = "CFT_BEACON_ADDR"
	LockFileEnv       = "CFT_LOCKFILE"
	IdentifierEnv     = "CFT_IDENTIFIER"
	NamespaceEnv      = "CFT_NAMESPACE"
	ResourcePolicyEnv = "CFT_RESOURCE_POLICY"
)
View Source
const (
	ResourcePolicyError    = "error"
	ResourcePolicyReuse    = "reuse"
	ResourcePolicyReusable = "reusable"
	ResourcePolicyTakeOver = "takeover"
)
View Source
const (
	LabelIdentifier = "daichitakahashi.confort.beacon.identifier"
)
View Source
const LockFile = ".confort.lock"

LockFile is default file name of lock file.

Variables

This section is empty.

Functions

func Address

func Address(ctx context.Context, lockFile string) (string, error)

Address returns address of beacon server. It returns value of CFT_BEACON_ADDR if exists. If not exists, read from lockFile.

func DeleteLockFile

func DeleteLockFile(lockFile string) error

func Identifier added in v0.3.0

func Identifier(s string) string

func LockFilePath

func LockFilePath() string

LockFilePath returns file name of lock file. If CFT_LOCKFILE is set, return its value, or else return LockFile.

func StoreAddressToLockFile

func StoreAddressToLockFile(lockFile, addr string) error

func ValidResourcePolicy

func ValidResourcePolicy(s string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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