internal

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildVersionString added in v0.1.1

func BuildVersionString() string

Types

type CommaSeparatedListFlag added in v0.4.0

type CommaSeparatedListFlag []string

func (*CommaSeparatedListFlag) Set added in v0.4.0

func (a *CommaSeparatedListFlag) Set(attributes string) error

Set is the method to set the flag value, part of the flag.Value interface. Set's argument is a string to be parsed to set the flag. It's a comma-separated list, so we split it.

func (*CommaSeparatedListFlag) String added in v0.4.0

func (a *CommaSeparatedListFlag) String() string

func (*CommaSeparatedListFlag) Type added in v0.4.0

func (a *CommaSeparatedListFlag) Type() string

type Semaphore

type Semaphore chan struct{}

Semaphore is a thin wrapper around a channel for using it as a semaphore.

func NewSemaphore

func NewSemaphore(n int) Semaphore

NewSemaphore creates a semaphore that allows up to a given limit of simultaneous acquisitions.

func (Semaphore) Acquire

func (s Semaphore) Acquire()

Acquire is used to acquire an available slot. Blocks until available.

func (Semaphore) Release

func (s Semaphore) Release()

Release is used to return a slot. Acquire must be called as a pre-condition.

Jump to

Keyboard shortcuts

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