Documentation
¶
Index ¶
- func NewRegistryCredentials(ghcrUsername string, ghcrToken string) *registryCredentials
- type AdvancedOptions
- type Config
- type LogChannels
- type Runner
- func (r *Runner) ContainerIsRunning(ctx context.Context, containerReference string) (bool, error)
- func (r *Runner) ExecCommand(ctx context.Context, containerReference string, command []string, ...) error
- func (r *Runner) ExecCommandString(ctx context.Context, containerReference string, command []string) (string, error)
- func (r *Runner) FindFirstAvailableImage(ctx context.Context, credentials *registryCredentials, ...) (string, error)
- func (r *Runner) KillContainer(ctx context.Context, containerReference string) error
- func (r *Runner) ListContainersMatchingLabel(ctx context.Context, label string, value string) ([]types.Container, error)
- func (r *Runner) PullImage(ctx context.Context, imageReference string) error
- func (r *Runner) PullImageWithCredentials(ctx context.Context, imageReference string, credentials *registryCredentials) error
- func (r *Runner) RunContainer(ctx context.Context, imageReference string, containerReference string, ...) (string, error)
- func (r *Runner) WaitForContainerToExit(ctx context.Context, containerReference string) error
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRegistryCredentials ¶
Types ¶
type AdvancedOptions ¶
type Config ¶
type Config struct {
Debug bool `env:"DEBUG" envDefault:"false"`
DatabaseURL string `env:"DATABASE_URL" envDefault:"postgres://postgres:postgres@localhost:5332/postgres?sslmode=disable"`
Host string `env:"HOST" envDefault:"0.0.0.0"`
Port string `env:"PORT" envDefault:"5900"`
AuthorizedOrigins []string `env:"AUTHORIZED_ORIGINS" envDefault:"http://localhost:3000,https://buf.build,https://graphene.fluffy-broadnose.ts.net"`
SentryDSN string `env:"SENTRY_DSN" envDefault:""`
Environment string `env:"ENVIRONMENT" envDefault:"development"`
// When set, all HTTP requests will be authenticated as this user, regardless of the actual token (or lack thereof)
DevelopmentAuthUserEmail string `env:"DEVELOPMENT_AUTH_USER_EMAIL" envDefault:""`
}
func ReadConfig ¶
type LogChannels ¶
type LogChannels struct {
BaseContext context.Context
Mixed chan string
ChannelClosed chan struct{}
}
func NewLogChannels ¶
func NewLogChannels(ctx context.Context) *LogChannels
func (*LogChannels) AttachScanner ¶
func (l *LogChannels) AttachScanner(scanner *bufio.Scanner)
func (*LogChannels) Close ¶
func (l *LogChannels) Close()
func (*LogChannels) Consumer ¶
func (l *LogChannels) Consumer() <-chan string
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) ContainerIsRunning ¶
func (*Runner) ExecCommand ¶
func (*Runner) ExecCommandString ¶
func (r *Runner) ExecCommandString(ctx context.Context, containerReference string, command []string) (string, error)
ExecCommandString runs a single command, waiting for it to complete, then returns all stdout/stderr as a string
func (*Runner) FindFirstAvailableImage ¶
func (*Runner) KillContainer ¶
func (*Runner) ListContainersMatchingLabel ¶
func (*Runner) PullImageWithCredentials ¶
func (*Runner) RunContainer ¶
Click to show internal directories.
Click to hide internal directories.