docker

package
v0.0.0-...-d892afd Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Worker

type Worker struct {
	Host          string `json:"host"`
	WorkerID      string `json:"worker_id"`
	ContainerID   string `json:"container_id"`
	PipelineRunID string `json:"pipeline_run_id"`
}

Worker represents the data structure of a docker worker.

func NewDockerWorker

func NewDockerWorker(host string, pipelineRunID string) *Worker

NewDockerWorker initiates a new worker instance.

func (*Worker) IsDockerWorkerRunning

func (w *Worker) IsDockerWorkerRunning() bool

IsDockerWorkerRunning checks if the docker worker is running.

func (*Worker) KillDockerWorker

func (w *Worker) KillDockerWorker() error

KillDockerWorker disconnects the existing docker worker and kills the docker container.

func (*Worker) SetupDockerWorker

func (w *Worker) SetupDockerWorker(workerImage string, workerSecret string) error

SetupDockerWorker starts a Bhojpur Belaur worker inside a docker container, automatically connects it with this Bhojpur Belaur instance and sets a unique tag.

Jump to

Keyboard shortcuts

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