Documentation ¶
Index ¶
- type Client
- func (c *Client) GetQueuedJobs(ctx context.Context) ([]*github.WorkflowRun, *time.Time, error)
- func (c *Client) GetState() (*state.ClientState, error)
- func (c *Client) GetWorkflowInfo(ctx context.Context) (map[int64]utils.WorkflowInfo, error)
- func (c *Client) SaveState(state *state.ClientState) error
- type GithubClient
- type IClient
- type IStatelessClient
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(innerClient IStatelessClient, name string, gitOwnerRepo string, cacheWindow time.Duration, cacheWindowWhenEmpty time.Duration, stateProvider state.IStateProvider) Client
func (*Client) GetQueuedJobs ¶
func (*Client) GetWorkflowInfo ¶
type GithubClient ¶
type GithubClient struct { Owner string Repository string // contains filtered or unexported fields }
func NewGitHubClient ¶
func NewGitHubClient(token string, owner string, repository string) GithubClient
func (*GithubClient) GetQueuedJobs ¶
func (c *GithubClient) GetQueuedJobs(ctx context.Context) ([]*github.WorkflowRun, error)
func (*GithubClient) GetRemainingCreditsForToken ¶
func (*GithubClient) GetWorkflowData ¶
func (c *GithubClient) GetWorkflowData(ctx context.Context) (*map[int64]utils.WorkflowInfo, error)
type IClient ¶
type IClient interface { GetQueuedJobs(ctx context.Context) (int, error) GetState() (*state.ClientState, error) SaveState(state *state.ClientState) error }
type IStatelessClient ¶
Click to show internal directories.
Click to hide internal directories.