2022-04-13 16:47:42 +00:00
|
|
|
package common
|
|
|
|
|
|
2022-04-29 23:43:37 +00:00
|
|
|
import (
|
2022-05-04 11:44:10 +00:00
|
|
|
"garm/params"
|
2022-04-29 23:43:37 +00:00
|
|
|
)
|
2022-04-23 13:05:40 +00:00
|
|
|
|
2022-04-27 16:56:28 +00:00
|
|
|
type PoolType string
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
RepositoryPool PoolType = "repository"
|
|
|
|
|
OrganizationPool PoolType = "organization"
|
|
|
|
|
)
|
|
|
|
|
|
2022-04-23 13:05:40 +00:00
|
|
|
type PoolManager interface {
|
|
|
|
|
WebhookSecret() string
|
|
|
|
|
HandleWorkflowJob(job params.WorkflowJob) error
|
2022-05-04 16:27:24 +00:00
|
|
|
RefreshState(param params.UpdatePoolStateParams) error
|
2022-05-05 07:54:52 +00:00
|
|
|
ID() string
|
2022-05-02 17:55:29 +00:00
|
|
|
// AddPool(ctx context.Context, pool params.Pool) error
|
2022-04-26 20:29:58 +00:00
|
|
|
|
|
|
|
|
// PoolManager lifecycle functions. Start/stop pool.
|
|
|
|
|
Start() error
|
|
|
|
|
Stop() error
|
|
|
|
|
Wait() error
|
|
|
|
|
}
|