utils

package
v0.0.0-...-2e52d37 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToMaster

func ConnectToMaster(addr string, client bool, id identity.NodeID)

ConnectToMaster connects to master node and set global Config

func FindIntSlice

func FindIntSlice(slice []int, val int) bool

func IdentifierFixture

func IdentifierFixture() crypto.Identifier

func MapRandomKeyGet

func MapRandomKeyGet(mapI interface{}) interface{}

func Max

func Max(a, b int) int

Max of two int

func RandomPick

func RandomPick(n int, f int) []int

func Retry

func Retry(f func() error, attempts int, sleep time.Duration) error

Retry function f sleep time between attempts

func Schedule

func Schedule(f func(), delay time.Duration) chan bool

Schedule repeatedly call function with intervals

func VMax

func VMax(v ...int) int

VMax of a vector

Types

This section is empty.

Jump to

Keyboard shortcuts

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