backend

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyBackend

type PolicyBackend interface {
	// PutJobPolicy is used to insert or update the scaling policy for a job and all its associated
	// task groups.
	PutJobPolicy(string, map[string]*policy.GroupScalingPolicy) error

	// PutJobGroupPolicy is used to insert or update the scaling policy of a task group.
	PutJobGroupPolicy(string, string, *policy.GroupScalingPolicy) error

	// GetPolicies is used to retrieve all currently configured job scaling policies.
	GetPolicies() (map[string]map[string]*policy.GroupScalingPolicy, error)

	// GetJobPolicy retrieves the scaling policy for a job.
	GetJobPolicy(string) (map[string]*policy.GroupScalingPolicy, error)

	// GetJobGroupPolicy retrieves the scaling policy for a job task group.
	GetJobGroupPolicy(string, string) (*policy.GroupScalingPolicy, error)

	// DeleteJobPolicy is used to delete all task group scaling policies associated to the named
	// job.
	DeleteJobPolicy(string) error

	// DeleteJobGroupPolicy deletes the stored policy for a particular job group.
	DeleteJobGroupPolicy(string, string) error
}

PolicyBackend is the interface required for a policy storage backend. A policy storage backend is used to durably store job scaling policies outside of Sherpa.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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