MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / NewGetWorkersOptions

Function NewGetWorkersOptions

pkg/cmd/worker/shared/worker.go:17–26  ·  view source on GitHub ↗
(dependencies *cmd.Dependencies, filter func(*machines.Worker) bool)

Source from the content-addressed store, hash-verified

15}
16
17func NewGetWorkersOptions(dependencies *cmd.Dependencies, filter func(*machines.Worker) bool) *GetWorkersOptions {
18 return &GetWorkersOptions{
19 GetWorkersCallback: func() ([]*machines.Worker, error) {
20 return GetWorkers(*dependencies.Client, filter)
21 },
22 GetWorkerCallback: func(identifier string) (*machines.Worker, error) {
23 return GetWorker(*dependencies.Client, identifier)
24 },
25 }
26}
27
28func NewGetWorkersOptionsForAllWorkers(dependencies *cmd.Dependencies) *GetWorkersOptions {
29 return &GetWorkersOptions{

Callers 2

NewDeleteOptionsFunction · 0.92
NewListOptionsFunction · 0.92

Calls 2

GetWorkersFunction · 0.85
GetWorkerFunction · 0.70

Tested by

no test coverage detected