Documentation ¶
Index ¶
- func DeleteByID(client newclient.Client, spaceID string, id string) error
- func IsNil(i interface{}) bool
- type DynamicWorkerPool
- func (w *DynamicWorkerPool) GetCanAddWorkers() bool
- func (w *DynamicWorkerPool) GetDescription() string
- func (w *DynamicWorkerPool) GetIsDefault() bool
- func (w *DynamicWorkerPool) GetName() string
- func (w *DynamicWorkerPool) GetSortOrder() int
- func (w *DynamicWorkerPool) GetSpaceID() string
- func (w *DynamicWorkerPool) GetWorkerPoolType() WorkerPoolType
- func (d *DynamicWorkerPool) GetWorkerType() string
- func (w *DynamicWorkerPool) SetCanAddWorkers(canAddWorkers bool)
- func (w *DynamicWorkerPool) SetDescription(description string)
- func (w *DynamicWorkerPool) SetIsDefault(isDefault bool)
- func (w *DynamicWorkerPool) SetName(name string)
- func (w *DynamicWorkerPool) SetSortOrder(sortOrder int)
- func (w *DynamicWorkerPool) SetSpaceID(spaceID string)
- func (w *DynamicWorkerPool) SetWorkerPoolType(workerPoolType WorkerPoolType)
- func (d *DynamicWorkerPool) Validate() error
- type DynamicWorkerPoolType
- type DynamicWorkerPoolTypes
- type IDynamicWorkerPool
- type IWorkerPool
- func Add(client newclient.Client, workerPool IWorkerPool) (IWorkerPool, error)
- func GetByID(client newclient.Client, spaceID string, ID string) (IWorkerPool, error)
- func ToWorkerPool(workerPoolResource *WorkerPoolResource) (IWorkerPool, error)
- func ToWorkerPoolArray(workerPoolResources []*WorkerPoolResource) []IWorkerPool
- func Update(client newclient.Client, workerPool IWorkerPool) (IWorkerPool, error)
- type StaticWorkerPool
- func (w *StaticWorkerPool) GetCanAddWorkers() bool
- func (w *StaticWorkerPool) GetDescription() string
- func (w *StaticWorkerPool) GetIsDefault() bool
- func (w *StaticWorkerPool) GetName() string
- func (w *StaticWorkerPool) GetSortOrder() int
- func (w *StaticWorkerPool) GetSpaceID() string
- func (w *StaticWorkerPool) GetWorkerPoolType() WorkerPoolType
- func (w *StaticWorkerPool) SetCanAddWorkers(canAddWorkers bool)
- func (w *StaticWorkerPool) SetDescription(description string)
- func (w *StaticWorkerPool) SetIsDefault(isDefault bool)
- func (w *StaticWorkerPool) SetName(name string)
- func (w *StaticWorkerPool) SetSortOrder(sortOrder int)
- func (w *StaticWorkerPool) SetSpaceID(spaceID string)
- func (w *StaticWorkerPool) SetWorkerPoolType(workerPoolType WorkerPoolType)
- func (s *StaticWorkerPool) Validate() error
- type WorkerPoolListResult
- type WorkerPoolResource
- func (w *WorkerPoolResource) GetCanAddWorkers() bool
- func (w *WorkerPoolResource) GetDescription() string
- func (w *WorkerPoolResource) GetIsDefault() bool
- func (w *WorkerPoolResource) GetName() string
- func (w *WorkerPoolResource) GetSortOrder() int
- func (w *WorkerPoolResource) GetSpaceID() string
- func (w *WorkerPoolResource) GetWorkerPoolType() WorkerPoolType
- func (w *WorkerPoolResource) GetWorkerType() string
- func (w *WorkerPoolResource) SetCanAddWorkers(canAddWorkers bool)
- func (w *WorkerPoolResource) SetDescription(description string)
- func (w *WorkerPoolResource) SetIsDefault(isDefault bool)
- func (w *WorkerPoolResource) SetName(name string)
- func (w *WorkerPoolResource) SetSortOrder(sortOrder int)
- func (w *WorkerPoolResource) SetSpaceID(spaceID string)
- func (w *WorkerPoolResource) SetWorkerPoolType(workerPoolType WorkerPoolType)
- func (w *WorkerPoolResource) SetWorkerType(workerType string)
- func (w *WorkerPoolResource) Validate() error
- type WorkerPoolService
- func (s *WorkerPoolService) Add(workerPool IWorkerPool) (IWorkerPool, error)deprecated
- func (s *WorkerPoolService) Get(workerPoolsQuery WorkerPoolsQuery) (*WorkerPools, error)deprecated
- func (s *WorkerPoolService) GetAll() ([]*WorkerPoolListResult, error)
- func (s *WorkerPoolService) GetByID(id string) (IWorkerPool, error)deprecated
- func (s *WorkerPoolService) GetByIdentifier(identifier string) (IWorkerPool, error)
- func (s *WorkerPoolService) GetByName(name string) ([]IWorkerPool, error)
- func (s *WorkerPoolService) GetDynamicWorkerTypes() ([]*DynamicWorkerPoolType, error)
- func (s *WorkerPoolService) GetWorkers(workerPool IWorkerPool) ([]*machines.Worker, error)
- func (s *WorkerPoolService) Update(workerPool IWorkerPool) (IWorkerPool, error)deprecated
- type WorkerPoolType
- type WorkerPools
- type WorkerPoolsQuery
- type WorkerPoolsSummaryQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByID ¶ added in v2.33.0
DeleteByID will delete a workerpool with the provided id.
Types ¶
type DynamicWorkerPool ¶
type DynamicWorkerPool struct { WorkerType string `json:"WorkerType"` // contains filtered or unexported fields }
func NewDynamicWorkerPool ¶
func NewDynamicWorkerPool(name string, workerType string) *DynamicWorkerPool
NewDynamicWorkerPool creates and initializes a dynamic worker pool.
func (*DynamicWorkerPool) GetCanAddWorkers ¶
func (w *DynamicWorkerPool) GetCanAddWorkers() bool
func (*DynamicWorkerPool) GetDescription ¶
func (w *DynamicWorkerPool) GetDescription() string
func (*DynamicWorkerPool) GetIsDefault ¶
func (w *DynamicWorkerPool) GetIsDefault() bool
func (*DynamicWorkerPool) GetName ¶
func (w *DynamicWorkerPool) GetName() string
GetName returns the name of the worker pool resource.
func (*DynamicWorkerPool) GetSortOrder ¶
func (w *DynamicWorkerPool) GetSortOrder() int
func (*DynamicWorkerPool) GetSpaceID ¶
func (w *DynamicWorkerPool) GetSpaceID() string
func (*DynamicWorkerPool) GetWorkerPoolType ¶
func (w *DynamicWorkerPool) GetWorkerPoolType() WorkerPoolType
GetWorkerPoolType returns the worker type for this worker pool.
func (*DynamicWorkerPool) GetWorkerType ¶
func (d *DynamicWorkerPool) GetWorkerType() string
GetWorkerType returns the worker type for this worker pool.
func (*DynamicWorkerPool) SetCanAddWorkers ¶
func (w *DynamicWorkerPool) SetCanAddWorkers(canAddWorkers bool)
func (*DynamicWorkerPool) SetDescription ¶
func (w *DynamicWorkerPool) SetDescription(description string)
func (*DynamicWorkerPool) SetIsDefault ¶
func (w *DynamicWorkerPool) SetIsDefault(isDefault bool)
func (*DynamicWorkerPool) SetName ¶
func (w *DynamicWorkerPool) SetName(name string)
SetName sets the name of the worker pool.
func (*DynamicWorkerPool) SetSortOrder ¶
func (w *DynamicWorkerPool) SetSortOrder(sortOrder int)
func (*DynamicWorkerPool) SetSpaceID ¶
func (w *DynamicWorkerPool) SetSpaceID(spaceID string)
func (*DynamicWorkerPool) SetWorkerPoolType ¶
func (w *DynamicWorkerPool) SetWorkerPoolType(workerPoolType WorkerPoolType)
func (*DynamicWorkerPool) Validate ¶
func (d *DynamicWorkerPool) Validate() error
Validate checks the state of the dynamic worker pool and returns an error if invalid.
type DynamicWorkerPoolType ¶ added in v2.17.4
type DynamicWorkerPoolTypes ¶ added in v2.17.4
type DynamicWorkerPoolTypes struct { ID string `json:"Id"` WorkerTypes []*DynamicWorkerPoolType `json:"WorkerTypes"` }
type IDynamicWorkerPool ¶
type IDynamicWorkerPool interface { GetWorkerType() string IWorkerPool }
type IWorkerPool ¶
type IWorkerPool interface { GetCanAddWorkers() bool GetDescription() string GetIsDefault() bool GetName() string GetSpaceID() string GetSortOrder() int GetWorkerPoolType() WorkerPoolType SetCanAddWorkers(bool) SetDescription(string) SetIsDefault(bool) SetName(string) SetSpaceID(string) SetSortOrder(int) SetWorkerPoolType(WorkerPoolType) resources.IHasName resources.IResource }
IWorkerPool defines the interface for worker pools.
func Add ¶ added in v2.33.0
func Add(client newclient.Client, workerPool IWorkerPool) (IWorkerPool, error)
Add creates a new worker pool.
func GetByID ¶ added in v2.33.0
GetByID returns the worker pool that matches the input ID. If one cannot be found, it returns nil and an error.
func ToWorkerPool ¶
func ToWorkerPool(workerPoolResource *WorkerPoolResource) (IWorkerPool, error)
func ToWorkerPoolArray ¶
func ToWorkerPoolArray(workerPoolResources []*WorkerPoolResource) []IWorkerPool
func Update ¶ added in v2.33.0
func Update(client newclient.Client, workerPool IWorkerPool) (IWorkerPool, error)
Update modifies a worker pool based on the one provided as input.
type StaticWorkerPool ¶
type StaticWorkerPool struct {
// contains filtered or unexported fields
}
func NewStaticWorkerPool ¶
func NewStaticWorkerPool(name string) *StaticWorkerPool
NewStaticWorkerPool creates and initializes a static worker pool.
func (*StaticWorkerPool) GetCanAddWorkers ¶
func (w *StaticWorkerPool) GetCanAddWorkers() bool
func (*StaticWorkerPool) GetDescription ¶
func (w *StaticWorkerPool) GetDescription() string
func (*StaticWorkerPool) GetIsDefault ¶
func (w *StaticWorkerPool) GetIsDefault() bool
func (*StaticWorkerPool) GetName ¶
func (w *StaticWorkerPool) GetName() string
GetName returns the name of the worker pool resource.
func (*StaticWorkerPool) GetSortOrder ¶
func (w *StaticWorkerPool) GetSortOrder() int
func (*StaticWorkerPool) GetSpaceID ¶
func (w *StaticWorkerPool) GetSpaceID() string
func (*StaticWorkerPool) GetWorkerPoolType ¶
func (w *StaticWorkerPool) GetWorkerPoolType() WorkerPoolType
GetWorkerPoolType returns the worker type for this worker pool.
func (*StaticWorkerPool) SetCanAddWorkers ¶
func (w *StaticWorkerPool) SetCanAddWorkers(canAddWorkers bool)
func (*StaticWorkerPool) SetDescription ¶
func (w *StaticWorkerPool) SetDescription(description string)
func (*StaticWorkerPool) SetIsDefault ¶
func (w *StaticWorkerPool) SetIsDefault(isDefault bool)
func (*StaticWorkerPool) SetName ¶
func (w *StaticWorkerPool) SetName(name string)
SetName sets the name of the worker pool.
func (*StaticWorkerPool) SetSortOrder ¶
func (w *StaticWorkerPool) SetSortOrder(sortOrder int)
func (*StaticWorkerPool) SetSpaceID ¶
func (w *StaticWorkerPool) SetSpaceID(spaceID string)
func (*StaticWorkerPool) SetWorkerPoolType ¶
func (w *StaticWorkerPool) SetWorkerPoolType(workerPoolType WorkerPoolType)
func (*StaticWorkerPool) Validate ¶
func (s *StaticWorkerPool) Validate() error
Validate checks the state of the static worker pool and returns an error if invalid.
type WorkerPoolListResult ¶ added in v2.14.0
type WorkerPoolResource ¶
type WorkerPoolResource struct { CanAddWorkers bool `json:"CanAddWorkers"` Description string `json:"Description,omitempty"` IsDefault bool `json:"IsDefault"` Name string `json:"Name" validate:"required,notblank"` SpaceID string `json:"SpaceId,omitempty" validate:"omitempty,notblank"` SortOrder int `json:"SortOrder"` WorkerPoolType WorkerPoolType `json:"WorkerPoolType"` WorkerType string `json:"WorkerType,omitempty"` resources.Resource }
func NewWorkerPoolResource ¶
func NewWorkerPoolResource(name string, workerPoolType WorkerPoolType) *WorkerPoolResource
NewWorkerPoolResource creates and initializes a worker pool resource.
func ToWorkerPoolResource ¶
func ToWorkerPoolResource(workerPool IWorkerPool) (*WorkerPoolResource, error)
func (*WorkerPoolResource) GetCanAddWorkers ¶
func (w *WorkerPoolResource) GetCanAddWorkers() bool
func (*WorkerPoolResource) GetDescription ¶
func (w *WorkerPoolResource) GetDescription() string
func (*WorkerPoolResource) GetIsDefault ¶
func (w *WorkerPoolResource) GetIsDefault() bool
func (*WorkerPoolResource) GetName ¶
func (w *WorkerPoolResource) GetName() string
GetName returns the name of the worker pool resource.
func (*WorkerPoolResource) GetSortOrder ¶
func (w *WorkerPoolResource) GetSortOrder() int
func (*WorkerPoolResource) GetSpaceID ¶
func (w *WorkerPoolResource) GetSpaceID() string
func (*WorkerPoolResource) GetWorkerPoolType ¶
func (w *WorkerPoolResource) GetWorkerPoolType() WorkerPoolType
GetWorkerPoolType returns the worker type for this worker pool resource.
func (*WorkerPoolResource) GetWorkerType ¶
func (w *WorkerPoolResource) GetWorkerType() string
GetWorkerType returns the worker type for this worker pool resource.
func (*WorkerPoolResource) SetCanAddWorkers ¶
func (w *WorkerPoolResource) SetCanAddWorkers(canAddWorkers bool)
func (*WorkerPoolResource) SetDescription ¶
func (w *WorkerPoolResource) SetDescription(description string)
func (*WorkerPoolResource) SetIsDefault ¶
func (w *WorkerPoolResource) SetIsDefault(isDefault bool)
func (*WorkerPoolResource) SetName ¶
func (w *WorkerPoolResource) SetName(name string)
SetName sets the name of the worker pool resource.
func (*WorkerPoolResource) SetSortOrder ¶
func (w *WorkerPoolResource) SetSortOrder(sortOrder int)
func (*WorkerPoolResource) SetSpaceID ¶
func (w *WorkerPoolResource) SetSpaceID(spaceID string)
func (*WorkerPoolResource) SetWorkerPoolType ¶
func (w *WorkerPoolResource) SetWorkerPoolType(workerPoolType WorkerPoolType)
func (*WorkerPoolResource) SetWorkerType ¶
func (w *WorkerPoolResource) SetWorkerType(workerType string)
func (*WorkerPoolResource) Validate ¶
func (w *WorkerPoolResource) Validate() error
Validate checks the state of the worker pool resource and returns an error if invalid.
type WorkerPoolService ¶
type WorkerPoolService struct { services.CanDeleteService // contains filtered or unexported fields }
func NewWorkerPoolService ¶
func (*WorkerPoolService) Add
deprecated
func (s *WorkerPoolService) Add(workerPool IWorkerPool) (IWorkerPool, error)
Add creates a new worker pool.
Deprecated: Use workerpools.Add
func (*WorkerPoolService) Get
deprecated
func (s *WorkerPoolService) Get(workerPoolsQuery WorkerPoolsQuery) (*WorkerPools, error)
Get returns a collection of worker pools based on the criteria defined by its input query parameter. If an error occurs, an empty collection is returned along with the associated error.
Deprecated: Use workerpools.Get
func (*WorkerPoolService) GetAll ¶
func (s *WorkerPoolService) GetAll() ([]*WorkerPoolListResult, error)
GetAll returns all worker pools. If none can be found or an error occurs, it returns an empty collection.
func (*WorkerPoolService) GetByID
deprecated
func (s *WorkerPoolService) GetByID(id string) (IWorkerPool, error)
GetByID returns the worker pool that matches the input ID. If one cannot be found, it returns nil and an error.
Deprecated: Use workerpools.GetByID
func (*WorkerPoolService) GetByIdentifier ¶ added in v2.17.0
func (s *WorkerPoolService) GetByIdentifier(identifier string) (IWorkerPool, error)
func (*WorkerPoolService) GetByName ¶ added in v2.17.0
func (s *WorkerPoolService) GetByName(name string) ([]IWorkerPool, error)
func (*WorkerPoolService) GetDynamicWorkerTypes ¶ added in v2.17.4
func (s *WorkerPoolService) GetDynamicWorkerTypes() ([]*DynamicWorkerPoolType, error)
func (*WorkerPoolService) GetWorkers ¶ added in v2.17.2
func (s *WorkerPoolService) GetWorkers(workerPool IWorkerPool) ([]*machines.Worker, error)
func (*WorkerPoolService) Update
deprecated
func (s *WorkerPoolService) Update(workerPool IWorkerPool) (IWorkerPool, error)
Update modifies a worker pool based on the one provided as input.
Deprecated: Use workerpools.Update
type WorkerPoolType ¶
type WorkerPoolType string
const ( WorkerPoolTypeDynamic WorkerPoolType = "DynamicWorkerPool" WorkerPoolTypeStatic WorkerPoolType = "StaticWorkerPool" )
type WorkerPools ¶
type WorkerPools struct { Items []IWorkerPool `json:"Items"` resources.PagedResults }
func Get ¶ added in v2.33.0
func Get(client newclient.Client, spaceID string, workerPoolsQuery WorkerPoolsQuery) (*WorkerPools, error)
Get returns a collection of worker pools based on the criteria defined by its input query parameter.
func ToWorkerPools ¶
func ToWorkerPools(workerPoolResources *resources.Resources[*WorkerPoolResource]) *WorkerPools
type WorkerPoolsQuery ¶
type WorkerPoolsQuery struct { IDs []string `uri:"ids,omitempty" url:"ids,omitempty"` Name string `uri:"name,omitempty" url:"name,omitempty"` PartialName string `uri:"partialName,omitempty" url:"partialName,omitempty"` Skip int `uri:"skip,omitempty" url:"skip,omitempty"` Take int `uri:"take,omitempty" url:"take,omitempty"` }
type WorkerPoolsSummaryQuery ¶
type WorkerPoolsSummaryQuery struct { CommunicationStyles []string `uri:"commStyles,omitempty" url:"commStyles,omitempty"` HealthStatuses []string `uri:"healthStatuses,omitempty" url:"healthStatuses,omitempty"` HideEmptyWorkerPools bool `uri:"hideEmptyWorkerPools,omitempty" url:"hideEmptyWorkerPools,omitempty"` IDs []string `uri:"ids,omitempty" url:"ids,omitempty"` IsDisabled bool `uri:"isDisabled,omitempty" url:"isDisabled,omitempty"` MachinePartialName string `uri:"machinePartialName,omitempty" url:"machinePartialName,omitempty"` PartialName string `uri:"partialName,omitempty" url:"partialName,omitempty"` ShellNames []string `uri:"shellNames,omitempty" url:"shellNames,omitempty"` }