semantic

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromJobSelectionPolicy

func FromJobSelectionPolicy(jsp model.JobSelectionPolicy) bidstrategy.SemanticBidStrategy

Create a BidStrategy that implements the passed JobSelectionPolicy.

func NewStorageInstalledBidStrategy

func NewStorageInstalledBidStrategy(storages storage.StorageProvider) bidstrategy.SemanticBidStrategy

Types

type ChainedBidStrategy

type ChainedBidStrategy struct {
	Strategies []bidstrategy.SemanticBidStrategy
}

func NewChainedSemanticBidStrategy

func NewChainedSemanticBidStrategy(strategies ...bidstrategy.SemanticBidStrategy) *ChainedBidStrategy

func (*ChainedBidStrategy) AddStrategy

func (c *ChainedBidStrategy) AddStrategy(strategy bidstrategy.SemanticBidStrategy)

AddStrategy Add new strategy to the end of the chain

func (*ChainedBidStrategy) ShouldBid

ShouldBid Iterate over all strategies, and return shouldBid if no error is thrown and none of the strategies return should not bid.

type DistanceDelayStrategy

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

func (DistanceDelayStrategy) ShouldBid

type DistanceDelayStrategyParams

type DistanceDelayStrategyParams struct {
	NetworkSize int
}

type ExternalCommandStrategy

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

func (*ExternalCommandStrategy) ShouldBid

type ExternalCommandStrategyParams

type ExternalCommandStrategyParams struct {
	Command string
}

type ExternalHTTPStrategy

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

func NewExternalHTTPStrategy

func NewExternalHTTPStrategy(params ExternalHTTPStrategyParams) *ExternalHTTPStrategy

func (*ExternalHTTPStrategy) ShouldBid

type ExternalHTTPStrategyParams

type ExternalHTTPStrategyParams struct {
	URL string
}

type InputLocalityStrategy

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

func (*InputLocalityStrategy) ShouldBid

type InputLocalityStrategyParams

type InputLocalityStrategyParams struct {
	Locality  model.JobSelectionDataLocality
	Executors executor.ExecutorProvider
}

type MockSemanticBidStrategy

type MockSemanticBidStrategy struct {
	mock.Mock
}

func (*MockSemanticBidStrategy) ShouldBid

type NetworkingStrategy

type NetworkingStrategy struct {
	Accept bool
}

func NewNetworkingStrategy

func NewNetworkingStrategy(accept bool) *NetworkingStrategy

func (*NetworkingStrategy) ShouldBid

ShouldBid implements BidStrategy

type ProviderInstalledStrategy

type ProviderInstalledStrategy[K model.ProviderKey, P model.Providable] struct {
	// contains filtered or unexported fields
}

func NewProviderInstalledArrayStrategy

func NewProviderInstalledArrayStrategy[K model.ProviderKey, P model.Providable](
	provider model.Provider[K, P],
	getter func(*model.Job) []K,
) *ProviderInstalledStrategy[K, P]

func NewProviderInstalledStrategy

func NewProviderInstalledStrategy[K model.ProviderKey, P model.Providable](
	provider model.Provider[K, P],
	getter func(*model.Job) K,
) *ProviderInstalledStrategy[K, P]

func (*ProviderInstalledStrategy[K, P]) ShouldBid

type StatelessJobStrategy

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

func NewStatelessJobStrategy

func NewStatelessJobStrategy(params StatelessJobStrategyParams) *StatelessJobStrategy

func (*StatelessJobStrategy) ShouldBid

type StatelessJobStrategyParams

type StatelessJobStrategyParams struct {
	RejectStatelessJobs bool
}

type TimeoutStrategy

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

func NewTimeoutStrategy

func NewTimeoutStrategy(params TimeoutStrategyParams) *TimeoutStrategy

func (*TimeoutStrategy) ShouldBid

type TimeoutStrategyParams

type TimeoutStrategyParams struct {
	MaxJobExecutionTimeout time.Duration
	MinJobExecutionTimeout time.Duration

	JobExecutionTimeoutClientIDBypassList []string
}

Jump to

Keyboard shortcuts

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