2022-04-13 16:47:42 +00:00
|
|
|
package runner
|
|
|
|
|
|
|
|
|
|
import (
|
2022-04-15 15:22:47 +00:00
|
|
|
"context"
|
2022-04-13 16:47:42 +00:00
|
|
|
"runner-manager/config"
|
|
|
|
|
"runner-manager/runner/common"
|
|
|
|
|
|
|
|
|
|
"github.com/google/go-github/github"
|
|
|
|
|
)
|
|
|
|
|
|
2022-04-15 15:22:47 +00:00
|
|
|
func NewRunner(ctx context.Context, cfg *config.Config) (*Runner, error) {
|
|
|
|
|
return &Runner{
|
|
|
|
|
ctx: ctx,
|
|
|
|
|
config: cfg,
|
|
|
|
|
}, nil
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-13 16:47:42 +00:00
|
|
|
type Runner struct {
|
2022-04-15 15:22:47 +00:00
|
|
|
ctx context.Context
|
2022-04-13 16:47:42 +00:00
|
|
|
ghc *github.Client
|
|
|
|
|
|
|
|
|
|
config *config.Config
|
|
|
|
|
pools []common.PoolManager
|
|
|
|
|
}
|