Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandUser ¶
ExpandUser turns, e.g., ~/hello to /home/youruser/hello it does *not* work on ~user/blah paths, however
func RunContextuallyInParallel ¶
RunContextuallyInParallel runs a set of goroutines which take a context and waits for them to terminate if any of the goroutines fail with an error, they will all immediately have their context cancelled and this method will return that error
func WaitCmdContextually ¶
WaitCmdContextually waits for a given exec.Cmd "in" the given context. There are two cases:
- If the command finishes before the context is finished, the result of cmd.Run is returned
- If the context is cancelled before the command finishes, the command's process is killed forcefully and this method returns immediately.
Types ¶
type BuildableService ¶
func FindServices ¶
func FindServices(dir string, ignorePaths []string) ([]BuildableService, error)
FindServices finds all of the buildable services in the given directory (e.g., folders which contain a Dockerfile)
type StringRingBuffer ¶
type StringRingBuffer struct {
// contains filtered or unexported fields
}
StringRingBuffer is a type which implements a ring buffer for strings
func CreateStringRingBuffer ¶
func CreateStringRingBuffer(size int) *StringRingBuffer
CreateStringRingBuffer creates a StringRingBuffer of a fixed, given size
func (*StringRingBuffer) Peek ¶
func (r *StringRingBuffer) Peek(num int) []string
Peek gets the last N elements inserted into this buffer, where the latest is the last element returned
func (*StringRingBuffer) Push ¶
func (r *StringRingBuffer) Push(s string)
Push adds a new element to this ring buffer
func (*StringRingBuffer) Usage ¶
func (r *StringRingBuffer) Usage() int
Usage returns the number of elements, up to capacity, which have been inserted into this ring buffer.