shared

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const FlagWorkerPool = "worker-pool"

Variables

This section is empty.

Functions

func ContributeAccount

func ContributeAccount(opts *ViewOptions, accountID string) ([]*output.DataRow, error)

func ContributeProxy

func ContributeProxy(opts *ViewOptions, proxyID string) ([]*output.DataRow, error)

func FindWorkerPoolIds

func FindWorkerPoolIds(opts *WorkerPoolOptions, flags *WorkerPoolFlags) ([]string, error)

func GetWorker

func GetWorker(client client.Client, identifier string) (*machines.Worker, error)

func GetWorkerPoolMap

func GetWorkerPoolMap(opts *ViewOptions) (map[string]string, error)

func GetWorkers

func GetWorkers(client client.Client, filter func(*machines.Worker) bool) ([]*machines.Worker, error)

func PromptForWorkerPools

func PromptForWorkerPools(opts *WorkerPoolOptions, flags *WorkerPoolFlags) error

func RegisterCreateWorkerWorkerPoolFlags

func RegisterCreateWorkerWorkerPoolFlags(cmd *cobra.Command, flags *WorkerPoolFlags)

func ViewRun

func ViewRun(opts *ViewOptions, contributeEndpoint ContributeEndpointCallback, description string) error

Types

type ContributeEndpointCallback

type ContributeEndpointCallback func(opts *ViewOptions, endpoint machines.IEndpoint) ([]*output.DataRow, error)

type GetAllWorkerPoolsCallback

type GetAllWorkerPoolsCallback func() ([]*workerpools.WorkerPoolListResult, error)

type GetWorkerCallback

type GetWorkerCallback func(identifer string) (*machines.Worker, error)

type GetWorkersCallback

type GetWorkersCallback func() ([]*machines.Worker, error)

type GetWorkersOptions

type GetWorkersOptions struct {
	GetWorkersCallback
	GetWorkerCallback
}

func NewGetWorkersOptions

func NewGetWorkersOptions(dependencies *cmd.Dependencies, filter func(*machines.Worker) bool) *GetWorkersOptions

func NewGetWorkersOptionsForAllWorkers

func NewGetWorkersOptionsForAllWorkers(dependencies *cmd.Dependencies) *GetWorkersOptions

type ViewFlags

type ViewFlags struct {
	*machinescommon.WebFlags
}

func NewViewFlags

func NewViewFlags() *ViewFlags

type ViewOptions

type ViewOptions struct {
	*cmd.Dependencies
	IdOrName string
	*ViewFlags
}

func NewViewOptions

func NewViewOptions(viewFlags *ViewFlags, dependencies *cmd.Dependencies, args []string) *ViewOptions

type WorkerPoolFlags

type WorkerPoolFlags struct {
	WorkerPools *flag.Flag[[]string]
}

func NewWorkerPoolFlags

func NewWorkerPoolFlags() *WorkerPoolFlags

type WorkerPoolOptions

type WorkerPoolOptions struct {
	*cmd.Dependencies
	GetAllWorkerPoolsCallback
}

func NewWorkerPoolOptions

func NewWorkerPoolOptions(dependencies *cmd.Dependencies) *WorkerPoolOptions

Jump to

Keyboard shortcuts

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