package
4.0.2-stable+incompatible
Repository: https://github.com/algorand/go-algorand.git
Documentation: pkg.go.dev
# Packages
Package bloom implements Bloom filters.
No description provided by the author
No description provided by the author
Package db defines database utility functions.
No description provided by the author
Package metrics provides a metric logging wrappers for Prometheus server.
No description provided by the author
No description provided by the author
Package timers provides a Clock abstraction useful for simulating timeouts.
No description provided by the author
No description provided by the author
# Functions
CopyFile uses io.Copy() to copy a file to another location This was copied from https://opensource.com/article/18/6/copying-files-go.
CopyFolder recursively copies an entire directory to another location (ignoring symlinks).
CopyFolderWithFilter recursively copies an entire directory to another location (ignoring symlinks) with an optional filter function to include/exclude folders or files.
ExecAndCaptureOutput runs the specified command and args and captures stdout into a string, returning the string or an error upon completion.
ExeDir returns the absolute path to the current executing binary (not including the filename).
FileExists checks to see if the specified file (or directory) exists.
FindProcess looks for a running process by its pid.
GetConnTCPInfo returns statistics for a TCP connection collected by the underlying network implementation, using a system call on Linux and Mac and returning an error for unsupported platforms.
GetCurrentProcessTimes gets current process kernel and usermode times.
GetFdLimits returns a current values for file descriptors limits.
GetFirstLineFromFile retrieves the first line of the specified file.
Getrusage gets file descriptors usage statistics.
Intersection constructs a new set, containing all elements that appear in all given sets.
IsDir returns true if the specified directory is valid.
IsEmpty recursively check path for files and returns true if there are none.
KillProcess kills a running OS process.
MakeSet constructs a set instance directly from elements.
MakeWatchdogStreamReader creates a watchdogStreamReader and initializes it.
MoveFile moves a file from src to dst.
NanoAfter waits for the duration to elapse and then sends the current time on the returned channel.
NanoSleep sleeps for the given d duration.
NewElasticRateLimiter creates an ElasticRateLimiter and initializes maps maxCapacity: the total (absolute maximum) number of capacity units vended by this ERL at a given time reservedCapacity: the number of capacity units to be reserved per client cmWindow: the window duration of data collection for congestion management, passed to the congestion manager conmanCount: the metric to increment when the congestion manager proposes dropping a request.
NewList creates a new list for storing values of type T.
NewREDCongestionManager creates a Congestion Manager which will watches capacityGuard activity, and regularly calculates a Target Service Rate, and can give "Should Drop" suggestions.
RunFuncWithSpinningCursor runs a given function in a go-routine, while displaying a spinning cursor to the CLI.
SetFdSoftLimit sets a new file descriptors soft limit.
SetGoroutineLabels sets profiler labels for identifying goroutines using the pprof package.
Union constructs a new set, containing all elements from the given sets.
# Variables
ErrNoTCPInfo is reported if getsockopt returned no TCP info for some reason.
ErrNotSyscallConn is reported when GetConnTCPInfo is passed a connection that doesn't satisfy the syscall.Conn interface.
ErrTCPInfoUnsupported is reported if TCP information is not available for this platform.
ErrWatchdogStreamReaderReaderReachedDataLimit is returned when watchdogStreamReader was asked to read beyond the designated data limits.
ErrWatchdogStreamReaderTimerElapsed is returned when the watchdogStreamReader was not reset in the past readaheadDuration and read was attempted.
# Structs
ElasticRateLimiter holds and distributes capacity through capacityQueues Capacity consumers are given an error if there is no capacity available for them, and a "capacityGuard" structure they can use to return the capacity when finished.
ErlCapacityGuard is the structure returned to clients so they can release the capacity when needed they also inform the congestion manager of events.
List represents a doubly linked list.
ListNode represent a list node holding next/prev pointers and a value of type T.
TCPInfo provides socket-level TCP information.
# Interfaces
CongestionManager is an interface for tracking events which happen to capacityQueues.
ErlClient clients must support OnClose for reservation closing.
WatchdogStreamReader is the public interface for the watchdogStreamReader implementation.
# Type aliases
IncludeFilter is a callback for filtering files and folders encountered while copying with CopyFileWithFilter().
Set is a type alias for map with empty struct{}, where keys are comparable We don't attempt to move even forward for the generics, for keys being comparable should be sufficient for most cases.