adapter

package
v0.0.0-...-71de28c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrJobNotFound = errors.New("job not found")

Functions

This section is empty.

Types

type GitHubAdapter

type GitHubAdapter interface {
	DownloadContent(ctx context.Context, owner, repo, path, ref string) (string, error)
}

func NewGitHubAdapter

func NewGitHubAdapter(conf config.GitHubAppConfig) (GitHubAdapter, error)

type JobsAdapter

type JobsAdapter interface {
	GetJob(ctx context.Context, name string) (*run.Job, error)
	CreateJob(ctx context.Context, job *run.Job) (*run.Job, error)
	UpdateJob(ctx context.Context, name string, job *run.Job) (*run.Job, error)
	StartJob(ctx context.Context, name string) (*run.Execution, error)
	WaitJobReady(ctx context.Context, name string) (bool, error)
}

func NewJobsAdapter

func NewJobsAdapter(ctx context.Context, project, region string) (JobsAdapter, error)

type Metadata

type Metadata struct {
	ProjectID string
	Region    string
}

func GetInstanceMetadata

func GetInstanceMetadata(ctx context.Context) (*Metadata, error)

type MetadataClient

type MetadataClient struct {
	// contains filtered or unexported fields
}

func NewMetadataClient

func NewMetadataClient() (*MetadataClient, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL