Documentation ¶
Index ¶
Constants ¶
View Source
const Filename = "machine-lock.log"
Filename represents the name of the logfile that is created in the LOG_DIR.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Clock ¶
type Clock interface { // After waits for the duration to elapse and then sends the // current time on the returned channel. After(time.Duration) <-chan time.Time // Now returns the current clock time. Now() time.Time }
Clock provides an interface for dealing with clocks.
type Lock ¶
type Lock interface { Acquire(spec Spec) (func(), error) Report(opts ...ReportOption) (string, error) }
Lock is used to give external packages something to refer to.
type ReportOption ¶
type ReportOption int
const ( ShowHistory ReportOption = iota ShowStack ShowDetailsYAML )
type Spec ¶
type Spec struct { Cancel <-chan struct{} // The purpose of the NoCancel is to ensure that there isn't // an accidental forgetting of the cancel channel. The primary // use case for this is the reboot worker that doesn't want to // pass in a cancel channel because it really wants to reboot. NoCancel bool Worker string Comment string Group string }
Spec is an argument struct for the `Acquire` method. It must have a Cancel channel and a Worker name defined.
Click to show internal directories.
Click to hide internal directories.