util

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BLSID

func BLSID(id uint64) *bls.ID

BLSID turns a uint64 in to a BLS identifier.

func InitMajordomo added in v1.2.0

func InitMajordomo(ctx context.Context) (majordomo.Service, error)

func LogLevel added in v1.1.0

func LogLevel(path string) zerolog.Level

LogLevel returns the best log level for the path.

func ResolvePath added in v1.2.0

func ResolvePath(path string) string

ResolvePath resolves a potentially relative path to an absolute path.

Types

type ScatterResult added in v0.9.0

type ScatterResult struct {
	// Offset is the offset at which the worker started.
	Offset int
	// Extent is the user-defined result of running the scatter function.
	Extent interface{}
}

ScatterResult is the result of a single scatter worker.

func Scatter added in v0.9.0

func Scatter(inputLen int, work func(int, int, *sync.RWMutex) (interface{}, error)) ([]*ScatterResult, error)

Scatter scatters a computation across multiple goroutines, returning a set of per-worker results.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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