wait

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package wait exposes utilities to synchronize containers based on file or network port.

Index

Constants

This section is empty.

Variables

View Source
var ErrTimeout = errors.New("the waiting for mounts has been too long: bailed")

ErrTimeout tells a wait for an event has timed out

Functions

func Done

func Done(touch string, _ ...Option) error

Done creates a file on the local file system.

A typical use is to signal to other containers that we are done (e.g. proxy container), using a touch file to communicate between the containers on the same pod.

This does nothing if the touch file argument is empty.

func FileIsPresent

func FileIsPresent(pth string, opts ...Option) (bool, error)

FileIsPresent waits for a file to be present on the local file system.

This does nothing if the pth argument is empty.

func PortIsOpen

func PortIsOpen(hostport string, opts ...Option) (bool, error)

PortIsOpen waits for a network port to be open.

This does nothing if the hostport argument is empty.

Types

type Option

type Option func(*options)

Jump to

Keyboard shortcuts

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