dockerh

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 8 Imported by: 1

README

dockerh

A library to help execute docker commands from a golang binary.

Some application helpers
  • ScyllaDB

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrPodHashNotFound - raised when the output is incompatible with the hash pattern
	ErrPodHashNotFound error = errors.New("pod hash pattern was not found")
)
View Source
var (
	// ErrPodNotListening - raised when the pod is not listening
	ErrPodNotListening error = errors.New("pod is not listening")
)

Functions

func Exists

func Exists(pod string, status PodStatus) (bool, error)

Exists - check if a pod exists

func GetIPs

func GetIPs(format string, pod ...string) ([]string, error)

GetIPs - return the pod's ips

func Remove

func Remove(pod string) error

Remove - removes a pod

func Run

func Run(name, image, extra string) error

Run - runs a pod

func StartScylla

func StartScylla(pod, extraCommands, networkFormat string, timeout time.Duration) (string, error)

StartScylla - starts the scylla pod

func WaitUntilListening

func WaitUntilListening(timeout time.Duration, address ...string) map[string]bool

WaitUntilListening - wait some pod(s) to be listening

Types

type PodStatus

type PodStatus string

PodStatus - the pod status to be filtered

const (
	// Restarting - pod status
	Restarting PodStatus = "restarting"

	// Running - pod status
	Running PodStatus = "running"

	// Removing - pod status
	Removing PodStatus = "removing"

	// Paused - pod status
	Paused PodStatus = "paused"

	// Exited - pod status
	Exited PodStatus = "exited"

	// Dead - pod status
	Dead PodStatus = "dead"
)

Jump to

Keyboard shortcuts

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