integration

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeServer       = "server"
	ModeClient       = "client"
	DefaultIOTimeout = 1 * time.Second
)

Variables

View Source
var (
	Local    snet.Addr
	Mode     string
	Sciond   string
	Attempts int
)

Functions

func AttemptRepeatedly

func AttemptRepeatedly(name string, attempt AttemptFunc) int

AttemptRepeatedly runs attempt until it returns true or more than Attempts were executed. Between two attempts at least RetryTimeout time has to pass. Returns 0 on success, 1 on failure.

func LogFatal

func LogFatal(msg string, a ...interface{})

LogFatal logs a critical error and exits with 1

func Setup

func Setup()

Types

type AttemptFunc

type AttemptFunc func(n int) bool

AttemptFunc attempts a request repeatedly, receives the attempt number

Jump to

Keyboard shortcuts

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