workspacebuild

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CleanupRunner

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

CleanupRunner is a runner that deletes a workspace in the Run phase.

func NewCleanupRunner

func NewCleanupRunner(client *codersdk.Client, workspaceID uuid.UUID) *CleanupRunner

func (*CleanupRunner) Run

func (r *CleanupRunner) Run(ctx context.Context, _ string, logs io.Writer) error

Run implements Runnable.

type Config

type Config struct {
	// OrganizationID is the ID of the organization to create the workspace in.
	OrganizationID uuid.UUID `json:"organization_id"`
	// UserID is the ID of the user to run the test as.
	UserID string `json:"user_id"`
	// Request is the request to send to the Coder API to create the workspace.
	// request.template_id must be set. A name will be generated if not
	// specified.
	Request codersdk.CreateWorkspaceRequest `json:"request"`
	// NoWaitForAgents determines whether the test should wait for the workspace
	// agents to connect before returning.
	NoWaitForAgents bool `json:"no_wait_for_agents"`
}

func (Config) Validate

func (c Config) Validate() error

type Runner

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

func NewRunner

func NewRunner(client *codersdk.Client, cfg Config) *Runner

func (*Runner) Cleanup

func (r *Runner) Cleanup(ctx context.Context, id string) error

Cleanup implements Cleanable by wrapping CleanupRunner.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, _ string, logs io.Writer) error

Run implements Runnable.

func (*Runner) WorkspaceID

func (r *Runner) WorkspaceID() (uuid.UUID, error)

Jump to

Keyboard shortcuts

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

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy