Add scaleset types
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
79b9a1583c
commit
51c7d2a806
4 changed files with 272 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package common
|
|||
|
||||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
|
||||
"github.com/google/go-github/v57/github"
|
||||
|
||||
|
|
@ -19,6 +20,11 @@ type GithubEntityOperations interface {
|
|||
RemoveEntityRunner(ctx context.Context, runnerID int64) (*github.Response, error)
|
||||
CreateEntityRegistrationToken(ctx context.Context) (*github.RegistrationToken, *github.Response, error)
|
||||
GetEntityJITConfig(ctx context.Context, instance string, pool params.Pool, labels []string) (jitConfigMap map[string]string, runner *github.Runner, err error)
|
||||
|
||||
// GetEntity returns the GitHub entity for which the github client was instanciated.
|
||||
GetEntity() params.GithubEntity
|
||||
// GithubBaseURL returns the base URL for the github or GHES API.
|
||||
GithubBaseURL() *url.URL
|
||||
}
|
||||
|
||||
// GithubClient that describes the minimum list of functions we need to interact with github.
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package pool
|
|||
|
||||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
|
||||
"github.com/google/go-github/v57/github"
|
||||
|
||||
|
|
@ -55,3 +56,11 @@ func (s *stubGithubClient) GetEntityJITConfig(_ context.Context, _ string, _ par
|
|||
func (s *stubGithubClient) GetWorkflowJobByID(_ context.Context, _, _ string, _ int64) (*github.WorkflowJob, *github.Response, error) {
|
||||
return nil, nil, s.err
|
||||
}
|
||||
|
||||
func (s *stubGithubClient) GetEntity() params.GithubEntity {
|
||||
return params.GithubEntity{}
|
||||
}
|
||||
|
||||
func (s *stubGithubClient) GithubBaseURL() *url.URL {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue