interfaces

package
v5.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: BSD-2-Clause, BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultExtraChecks = 10

DefaultExtraChecks is the default value for ExtraChecks on reception.Identity

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientError

type ClientError struct {
	Source  string
	Message string
	Trace   string
}

type ClientErrorReport

type ClientErrorReport func(source, message, trace string)

type HealthTracker

type HealthTracker interface {
	AddChannel(chan bool) uint64
	RemoveChannel(uint64)
	AddFunc(f func(bool)) uint64
	RemoveFunc(uint64)
	IsHealthy() bool
	WasHealthy() bool
}

type RequestCallback

type RequestCallback func(requestor contact.Contact)

type RestoreContactsUpdater

type RestoreContactsUpdater interface {
	// RestoreContactsCallback is called to report the current # of contacts
	// that have been found and how many have been restored
	// against the total number that need to be
	// processed. If an error occurs it it set on the err variable as a
	// plain string.
	RestoreContactsCallback(numFound, numRestored, total int, err string)
}

RestoreContactsUpdater interface provides a callback function for receiving update information from RestoreContactsFromBackup.

type RoundEvents

type RoundEvents interface {
	// designates a callback to call on the specified event
	// rid is the id of the round the event occurs on
	// callback is the callback the event is triggered on
	// timeout is the amount of time before an error event is returned
	// valid states are the states which the event should trigger on
	AddRoundEvent(rid id.Round, callback ds.RoundEventCallback,
		timeout time.Duration, validStates ...states.Round) *ds.EventCallback

	// designates a go channel to signal the specified event
	// rid is the id of the round the event occurs on
	// eventChan is the channel the event is triggered on
	// timeout is the amount of time before an error event is returned
	// valid states are the states which the event should trigger on
	AddRoundEventChan(rid id.Round, eventChan chan ds.EventReturn,
		timeout time.Duration, validStates ...states.Round) *ds.EventCallback

	//Allows the un-registration of a round event before it triggers
	Remove(rid id.Round, e *ds.EventCallback)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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