utils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: Apache-2.0 Imports: 13 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpJSON

func DumpJSON(r interface{}) string

DumpJSON dumps a json-compatible struct in human-readable form

func ParseEnabled

func ParseEnabled(value string) (bool, error)

ParseEnabled returns whether the given string represents an 'enabled' state.

func ServerActiveAt

func ServerActiveAt(socket string) bool

ServerActiveAt checks if a gRPC server is accepting connections at the socket.

func SortUint64s

func SortUint64s(a []uint64)

SortUint64s sorts a slice of uint64 in increasing order.

func UncompressTbz2 added in v0.5.0

func UncompressTbz2(archive string, dir string) error

func WaitForServer

func WaitForServer(socket string, timeout time.Duration, opts ...interface{}) error

WaitForServer waits for a gRPC server to start accepting connections on a socket.

Types

type Uint64Slice

type Uint64Slice []uint64

Uint64Slice implmenents sort.Interface for a slice of uint64.

func (Uint64Slice) Len

func (s Uint64Slice) Len() int

Len returns the length of an UintSlice

func (Uint64Slice) Less

func (s Uint64Slice) Less(i, j int) bool

Less returns true if element at 'i' is less than the element at 'j'

func (Uint64Slice) Swap

func (s Uint64Slice) Swap(i, j int)

Swap swaps the values of two elements

Jump to

Keyboard shortcuts

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