MCPcopy Create free account
hub / github.com/cloudbase/garm / Pool

Struct Pool

params/params.go:467–522  ·  view source on GitHub ↗

swagger:model Pool

Source from the content-addressed store, hash-verified

465
466// swagger:model Pool
467type Pool struct {
468 RunnerPrefix
469
470 ID string `json:"id,omitempty"`
471 ProviderName string `json:"provider_name,omitempty"`
472 MaxRunners uint `json:"max_runners,omitempty"`
473 MinIdleRunners uint `json:"min_idle_runners,omitempty"`
474 Image string `json:"image,omitempty"`
475 Flavor string `json:"flavor,omitempty"`
476 OSType commonParams.OSType `json:"os_type,omitempty"`
477 OSArch commonParams.OSArch `json:"os_arch,omitempty"`
478 Tags []Tag `json:"tags,omitempty"`
479 Enabled bool `json:"enabled,omitempty"`
480 Instances []Instance `json:"instances,omitempty"`
481 EnableShell bool `json:"enable_shell"`
482
483 // Generation holds the numeric generation of the pool. This number
484 // will be incremented, every time certain settings of the pool, which
485 // may influence how runners are created (flavor, specs, image) are changed.
486 // When a runner is created, this generation will be copied to the runners as
487 // well. That way if some settings diverge, we can target those runners
488 // to be recreated.
489 Generation uint64 `json:"generation"`
490
491 RepoID string `json:"repo_id,omitempty"`
492 RepoName string `json:"repo_name,omitempty"`
493
494 OrgID string `json:"org_id,omitempty"`
495 OrgName string `json:"org_name,omitempty"`
496
497 EnterpriseID string `json:"enterprise_id,omitempty"`
498 EnterpriseName string `json:"enterprise_name,omitempty"`
499
500 Endpoint ForgeEndpoint `json:"endpoint,omitempty"`
501
502 RunnerBootstrapTimeout uint `json:"runner_bootstrap_timeout,omitempty"`
503 CreatedAt time.Time `json:"created_at,omitempty"`
504 UpdatedAt time.Time `json:"updated_at,omitempty"`
505 // ExtraSpecs is an opaque raw json that gets sent to the provider
506 // as part of the bootstrap params for instances. It can contain
507 // any kind of data needed by providers. The contents of this field means
508 // nothing to garm itself. We don't act on the information in this field at
509 // all. We only validate that it's a proper json.
510 ExtraSpecs json.RawMessage `json:"extra_specs,omitempty"`
511 // GithubRunnerGroup is the github runner group in which the runners will be added.
512 // The runner group must be created by someone with access to the enterprise.
513 GitHubRunnerGroup string `json:"github-runner-group,omitempty"`
514
515 // Priority is the priority of the pool. The higher the number, the higher the priority.
516 // When fetching matching pools for a set of tags, the result will be sorted in descending
517 // order of priority.
518 Priority uint `json:"priority,omitempty"`
519
520 TemplateID uint `json:"template_id,omitempty"`
521 TemplateName string `json:"template_name,omitempty"`
522}
523
524func (p Pool) BelongsTo(entity ForgeEntity) bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected