Documentation ¶
Index ¶
- 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() WorkerType
- 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 IDynamicWorkerPool
- type IWorkerPool
- 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 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() WorkerType
- 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 WorkerType)
- func (w *WorkerPoolResource) Validate() error
- type WorkerPoolService
- func (s *WorkerPoolService) Add(workerPool IWorkerPool) (IWorkerPool, error)
- func (s *WorkerPoolService) Get(workerPoolsQuery WorkerPoolsQuery) (*WorkerPools, error)
- func (s *WorkerPoolService) GetAll() ([]IWorkerPool, error)
- func (s *WorkerPoolService) GetByID(id string) (IWorkerPool, error)
- func (s *WorkerPoolService) Update(workerPool IWorkerPool) (IWorkerPool, error)
- type WorkerPoolType
- type WorkerPools
- type WorkerPoolsQuery
- type WorkerPoolsSummaryQuery
- type WorkerType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamicWorkerPool ¶
type DynamicWorkerPool struct { WorkerType WorkerType `json:"WorkerType"` // contains filtered or unexported fields }
func NewDynamicWorkerPool ¶
func NewDynamicWorkerPool(name string, workerType WorkerType) *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() WorkerType
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 IDynamicWorkerPool ¶
type IDynamicWorkerPool interface { GetWorkerType() WorkerType 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 ToWorkerPool ¶
func ToWorkerPool(workerPoolResource *WorkerPoolResource) (IWorkerPool, error)
func ToWorkerPoolArray ¶
func ToWorkerPoolArray(workerPoolResources []*WorkerPoolResource) []IWorkerPool
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 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 WorkerType `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() WorkerType
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 WorkerType)
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 ¶
func (s *WorkerPoolService) Add(workerPool IWorkerPool) (IWorkerPool, error)
Add creates a new worker pool.
func (*WorkerPoolService) Get ¶
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.
func (*WorkerPoolService) GetAll ¶
func (s *WorkerPoolService) GetAll() ([]IWorkerPool, error)
GetAll returns all worker pools. If none can be found or an error occurs, it returns an empty collection.
func (*WorkerPoolService) GetByID ¶
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.
func (*WorkerPoolService) Update ¶
func (s *WorkerPoolService) Update(workerPool IWorkerPool) (IWorkerPool, error)
Update modifies a worker pool based on the one provided as input.
type WorkerPoolType ¶
type WorkerPoolType string
const ( WorkerPoolTypeDynamic WorkerPoolType = "DynamicWorkerPool" WorkerPoolTypeStatic WorkerPoolType = "StaticWorkerPool" )
type WorkerPools ¶
type WorkerPools struct { Items []IWorkerPool `json:"Items"` resources.PagedResults }
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"` }
type WorkerType ¶
type WorkerType string
const ( WorkerTypeUbuntu1804 WorkerType = "Ubuntu1804" WorkerTypeUbuntuDefault WorkerType = "UbuntuDefault" WorkerTypeWindows2016 WorkerType = "Windows2016" WorkerTypeWindows2019 WorkerType = "Windows2019" WorkerTypeUWindowsDefault WorkerType = "WindowsDefault" )