util

package
v0.0.0-...-b92c3bc Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDefaultIfZero

func SetDefaultIfZero[V comparable](v *V, defaultVal V)

func SliceLast

func SliceLast[S ~[]E, E any](s S) E

func SlicePopLast

func SlicePopLast[S ~[]E, E any](s S) S

Types

type Bytes

type Bytes uint64

func (Bytes) String

func (b Bytes) String() string

type DetailedBytes

type DetailedBytes uint64

func (DetailedBytes) String

func (b DetailedBytes) String() string

type OneRunner

type OneRunner struct {
	// contains filtered or unexported fields
}

func NewOneRunner

func NewOneRunner(f func()) *OneRunner

func (*OneRunner) Go

func (r *OneRunner) Go()

func (*OneRunner) Run

func (r *OneRunner) Run()

func (*OneRunner) Running

func (r *OneRunner) Running() bool

func (*OneRunner) Wait

func (r *OneRunner) Wait()

type SimpleReaderAtReader

type SimpleReaderAtReader struct {
	// contains filtered or unexported fields
}

func NewSimpleReaderAtReader

func NewSimpleReaderAtReader(r io.ReaderAt, off int64) *SimpleReaderAtReader

func (*SimpleReaderAtReader) Read

func (r *SimpleReaderAtReader) Read(b []byte) (int, error)

type Unlocker

type Unlocker interface {
	Unlock()
}

type WaitBarrier

type WaitBarrier struct {
	// contains filtered or unexported fields
}

func (*WaitBarrier) Barrier

func (b *WaitBarrier) Barrier()

func (*WaitBarrier) BarrierWithUnlock

func (b *WaitBarrier) BarrierWithUnlock(u Unlocker)

func (*WaitBarrier) Start

func (b *WaitBarrier) Start() WaitBarrierContext

type WaitBarrierContext

type WaitBarrierContext struct {
	// contains filtered or unexported fields
}

func (WaitBarrierContext) Done

func (c WaitBarrierContext) Done()

Jump to

Keyboard shortcuts

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