targetlist_with_state

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Name = "TargetListWithState"

Name defined the name of the plugin

Functions

func Load

Load returns the name and factory which are needed to register the TargetManager.

func New

func New() target.TargetManager

New builds a new TargetListWithState object.

Types

type AcquireParameters

type AcquireParameters struct {
	Targets []*target.Target
}

AcquireParameters contains the parameters necessary to acquire targets.

type ReleaseParameters

type ReleaseParameters struct {
}

ReleaseParameters contains the parameters necessary to release targets.

type TargetListWithState

type TargetListWithState struct {
}

TargetListWithState implements the contest.TargetManager interface.

func (*TargetListWithState) Acquire

func (tlws *TargetListWithState) Acquire(ctx xcontext.Context, jobID types.JobID, jobTargetManagerAcquireTimeout time.Duration, parameters interface{}, tl target.Locker) ([]*target.Target, error)

Acquire implements contest.TargetManager.Acquire

func (*TargetListWithState) Release

func (tlws *TargetListWithState) Release(ctx xcontext.Context, jobID types.JobID, targets []*target.Target, params interface{}) error

Release releases the acquired resources.

func (TargetListWithState) ValidateAcquireParameters

func (tlws TargetListWithState) ValidateAcquireParameters(params []byte) (interface{}, error)

ValidateAcquireParameters valides parameters that will be passed to Acquire.

func (TargetListWithState) ValidateReleaseParameters

func (tlws TargetListWithState) ValidateReleaseParameters(params []byte) (interface{}, error)

ValidateReleaseParameters valides parameters that will be passed to Release.

Jump to

Keyboard shortcuts

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