provisioner

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provisioner

type Provisioner interface {
	CreateWorker(ctx context.Context, args WorkerArgs) (Worker, error)
	ListWorkers(ctx context.Context) ([]Worker, error)
	DeleteWorker(ctx context.Context, workerID string) error
}

Provisioner is an interface declaring what methods are required for a provisioner.

func NewK8sProvisioner

func NewK8sProvisioner(config *config.Config, restConfig *rest.Config) (Provisioner, error)

NewK8sProvisioner returns a new Provisioner implementation that targets Kubernetes using a specific Kubernetes namespace and REST config.

type Worker

type Worker struct {
	WorkerID  string             `json:"workerId"`
	Name      string             `json:"name"`
	Status    workermodel.Status `json:"status"`
	CreatedAt time.Time          `json:"createdAt"`
}

Worker contains the data of a worker, an abstraction over k8s pods which is rougly comparable to a group of Docker containers sharing namespaces/volumes.

type WorkerArgs

type WorkerArgs struct {
	GitCloneURL    string
	GitCloneBranch string
	SubDir         string

	Environment string
	Stage       string

	Inputs         map[string]any
	AdditionalVars map[string]any

	WharfInstanceID string
	ProjectID       uint
	BuildID         uint
}

WorkerArgs are arguments fed to the wharf-cmd-worker.

Directories

Path Synopsis
docs
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag

Jump to

Keyboard shortcuts

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