garm/runner/common/pool.go
Gabriel Adrian Samfira 1e2e96ccb5 Paralelize loading pools
2022-05-05 07:54:52 +00:00

25 lines
490 B
Go

package common
import (
"garm/params"
)
type PoolType string
const (
RepositoryPool PoolType = "repository"
OrganizationPool PoolType = "organization"
)
type PoolManager interface {
WebhookSecret() string
HandleWorkflowJob(job params.WorkflowJob) error
RefreshState(param params.UpdatePoolStateParams) error
ID() string
// AddPool(ctx context.Context, pool params.Pool) error
// PoolManager lifecycle functions. Start/stop pool.
Start() error
Stop() error
Wait() error
}