reboot

package
v0.0.0-...-298751d Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

Monitor leverages juju's transient file mechanism to deliver one-off machine reboot notifications to interested entities.

func NewMonitor

func NewMonitor(transientDir string) *Monitor

NewMonitor returns a reboot monitor instance that stores its internal state into transientDir.

func (*Monitor) PurgeState

func (m *Monitor) PurgeState(tag names.Tag) error

PurgeState deletes any internal state maintained by the monitor for a particular entity.

func (*Monitor) Query

func (m *Monitor) Query(tag names.Tag) (bool, error)

Check for a pending reboot notification for the specified tag. Once the notification is consumed, future calls to Check will always return false.

Jump to

Keyboard shortcuts

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