Documentation
¶
Overview ¶
Copyright 2025 steadybit GmbH. All rights reserved.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocateExecutable ¶ added in v1.3.3
func ReadCpusAllowedCount ¶ added in v1.2.18
func RootCommandContext ¶ added in v1.4.0
func ShortenUUID ¶ added in v1.2.17
Types ¶
type BackgroundState ¶ added in v1.4.0
type BackgroundState struct {
// contains filtered or unexported fields
}
func RunCommandInBackground ¶ added in v1.4.0
func (*BackgroundState) Exited ¶ added in v1.4.0
func (r *BackgroundState) Exited() (bool, error)
func (*BackgroundState) Wait ¶ added in v1.4.0
func (r *BackgroundState) Wait()
type KeyMutex ¶
type KeyMutex interface { // Acquires a lock associated with the specified ID, creates the lock if one doesn't already exist. LockKey(id string) // Releases the lock associated with the specified ID. // Returns an error if the specified ID doesn't exist. UnlockKey(id string) error }
KeyMutex is a thread-safe interface for acquiring locks on arbitrary strings.
func NewHashedKeyMutex ¶
NewHashedKeyMutex returns a new instance of KeyMutex which hashes arbitrary keys to a fixed set of locks. `n` specifies number of locks, if n <= 0, we use number of cpus. Note that because it uses fixed set of locks, different keys may share same lock, so it's possible to wait on same lock.
Click to show internal directories.
Click to hide internal directories.