Documentation
¶
Index ¶
- Variables
- func AdaptError(err error, exitCode int) *cli.ExitError
- func AdaptErrorWithMessage(err error, msg string, exitCode int) *cli.ExitError
- func AddrOf[T any](value T) *T
- func Contains[I comparable](collection []I, item I) bool
- func ContainsWithMatcher[I comparable](collection []I, matcher func(other I) bool) bool
- func DistinctItems[V any](items []V, identityFn func(item V) string) []V
- func Filter[I comparable](collection []I, filter func(item I) bool) []I
- func FilterMap[K, V comparable](source map[K]V, filter func(key K, value V) bool) map[K]V
- func IndexOf[I comparable](collection []I, item I) int
- func IndexOfWithMatcher[I comparable](collection []I, matcher func(other I) bool) int
- func Map[E, R any](elements []E, mapper func(element E) R) []R
- func MapWithIterator[E, R any](iterator Iterator[E], mapper func(element E) R) []R
- func RandomTextString(length int) string
- func Sort[I comparable](collection []I, less func(this, other I) bool)
- type Iterator
- type MultiShutdownAwaiter
- type Queue
- type ShutdownAwaiter
- type Waiter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWaiterTimeout = fmt.Errorf("waiter timed out")
Functions ¶
func AdaptErrorWithMessage ¶
func Contains ¶
func Contains[I comparable](collection []I, item I) bool
func ContainsWithMatcher ¶
func ContainsWithMatcher[I comparable](collection []I, matcher func(other I) bool) bool
func DistinctItems ¶
func Filter ¶
func Filter[I comparable](collection []I, filter func(item I) bool) []I
func FilterMap ¶
func FilterMap[K, V comparable](source map[K]V, filter func(key K, value V) bool) map[K]V
func IndexOf ¶
func IndexOf[I comparable](collection []I, item I) int
func IndexOfWithMatcher ¶
func IndexOfWithMatcher[I comparable](collection []I, matcher func(other I) bool) int
func MapWithIterator ¶
func RandomTextString ¶
func Sort ¶
func Sort[I comparable](collection []I, less func(this, other I) bool)
Types ¶
type MultiShutdownAwaiter ¶
type MultiShutdownAwaiter struct {
// contains filtered or unexported fields
}
func NewMultiShutdownAwaiter ¶
func NewMultiShutdownAwaiter(slots uint) *MultiShutdownAwaiter
func (*MultiShutdownAwaiter) AwaitDone ¶
func (msa *MultiShutdownAwaiter) AwaitDone()
func (*MultiShutdownAwaiter) AwaitShutdown ¶
func (msa *MultiShutdownAwaiter) AwaitShutdown(slot uint) error
func (*MultiShutdownAwaiter) AwaitShutdownChan ¶
func (msa *MultiShutdownAwaiter) AwaitShutdownChan(slot uint) <-chan bool
func (*MultiShutdownAwaiter) SignalDone ¶
func (msa *MultiShutdownAwaiter) SignalDone()
func (*MultiShutdownAwaiter) SignalShutdown ¶
func (msa *MultiShutdownAwaiter) SignalShutdown()
type ShutdownAwaiter ¶
type ShutdownAwaiter struct {
// contains filtered or unexported fields
}
func NewShutdownAwaiter ¶
func NewShutdownAwaiter() *ShutdownAwaiter
func (*ShutdownAwaiter) AwaitDone ¶
func (sa *ShutdownAwaiter) AwaitDone() error
func (*ShutdownAwaiter) AwaitShutdown ¶
func (sa *ShutdownAwaiter) AwaitShutdown() error
func (*ShutdownAwaiter) AwaitShutdownChan ¶
func (sa *ShutdownAwaiter) AwaitShutdownChan() <-chan bool
func (*ShutdownAwaiter) SignalDone ¶
func (sa *ShutdownAwaiter) SignalDone()
func (*ShutdownAwaiter) SignalShutdown ¶
func (sa *ShutdownAwaiter) SignalShutdown()
type Waiter ¶
type Waiter struct {
// contains filtered or unexported fields
}
func NewWaiterWithTimeout ¶
Click to show internal directories.
Click to hide internal directories.