volumewatcher

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MPL-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSIVolumeRPC added in v0.12.2

type CSIVolumeRPC interface {
	Unpublish(args *structs.CSIVolumeUnpublishRequest, reply *structs.CSIVolumeUnpublishResponse) error
}

CSIVolumeRPC is a minimal interface of the Server, intended as an aid for testing logic surrounding server-to-server or server-to-client RPC calls and to avoid circular references between the nomad package and the volumewatcher

type Watcher

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

Watcher is used to watch volumes and their allocations created by the scheduler and trigger the scheduler when allocation health transitions.

func NewVolumesWatcher

func NewVolumesWatcher(logger log.Logger, rpc CSIVolumeRPC, leaderAcl string) *Watcher

NewVolumesWatcher returns a volumes watcher that is used to watch volumes and trigger the scheduler as needed.

func (*Watcher) SetEnabled

func (w *Watcher) SetEnabled(enabled bool, state *state.StateStore)

SetEnabled is used to control if the watcher is enabled. The watcher should only be enabled on the active leader. When being enabled the state is passed in as it is no longer valid once a leader election has taken place.

Jump to

Keyboard shortcuts

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