autodctest

package
v0.0.0-...-98749a9 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntryPoint

func EntryPoint(ctx context.Context, m *pubsub.Message, machineType string, numLocalSSDs int, zone string, jpHolidays []string) error

EntryPoint consumes a Pub/Sub message

func MakeNecoDevServiceAccountEmail

func MakeNecoDevServiceAccountEmail(projectID string) string

MakeNecoDevServiceAccountEmail returns custom service account name in the project

Types

type Runner

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

Runner runs dctest environments on GCP instances

func NewRunner

func NewRunner(computeClient *gcp.ComputeClient) *Runner

NewRunner creates Runner

func (Runner) CreateInstancesIfNotExist

func (r Runner) CreateInstancesIfNotExist(
	ctx context.Context,
	instanceNamePrefix string,
	instancesNum int,
	serviceAccountEmail string,
	machineType string,
	numLocalSSDs int,
	imageURL string,
	startupScript string,
) error

CreateInstancesIfNotExist lists instances not existing and create them

func (Runner) DeleteFilteredInstances

func (r Runner) DeleteFilteredInstances(ctx context.Context, filter string) error

DeleteFilteredInstances deletes instances which match the given filter

type StartupScriptBuilder

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

StartupScriptBuilder creates startup-script builder to run dctest

func NewStartupScriptBuilder

func NewStartupScriptBuilder() *StartupScriptBuilder

NewStartupScriptBuilder creates NecoStartupScriptBuilder

func (*StartupScriptBuilder) Build

func (b *StartupScriptBuilder) Build() string

Build builds startup script

func (*StartupScriptBuilder) WithFluentd

func (b *StartupScriptBuilder) WithFluentd() *StartupScriptBuilder

WithFluentd enables fluentd logging

func (*StartupScriptBuilder) WithNeco

func (b *StartupScriptBuilder) WithNeco(branch string) *StartupScriptBuilder

WithNeco sets branch name to run neco

func (*StartupScriptBuilder) WithNecoApps

func (b *StartupScriptBuilder) WithNecoApps(branch string) (*StartupScriptBuilder, error)

WithNecoApps sets branch name to run neco-apps

Jump to

Keyboard shortcuts

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