provider

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package provider defines the interface for managing providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detail

type Detail struct {
	metaschedulerabi.Provider
	IsWaitingForApproval bool
	IsValidForScheduling bool
	JobCount             uint64
}

Detail contains all the specs and statuses of a Provider.

type GetProviderOption

type GetProviderOption func(*GetProviderOptions)

GetProviderOption is an interface for options for the GetProvider method.

func WithAffinity

func WithAffinity(affinities ...types.Affinity) GetProviderOption

WithAffinity adds key-value filters with operators to the job, which filters the available clusters.

func WithProposal

func WithProposal() GetProviderOption

WithProposal enables GetProvider to show the proposal of a provider.

type GetProviderOptions

type GetProviderOptions struct {
	Proposal   bool
	Affinities []types.Affinity
}

GetProviderOptions is the structure for holding options for the GetProvider method.

type Manager

type Manager interface {
	ApproveProvider(ctx context.Context, provider common.Address) error
	RemoveProvider(ctx context.Context, provider common.Address) error
	GetProvider(
		ctx context.Context,
		address common.Address,
		opts ...GetProviderOption,
	) (provider Detail, err error)
	GetProviders(
		ctx context.Context,
		opts ...GetProviderOption,
	) (providers []Detail, err error)
}

Manager manages admin operation of providers

Jump to

Keyboard shortcuts

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