utils

package
v0.0.0-...-4e9d6c2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

Exists checks whether file or directory exists under the given 'path' on the system.

func SanitizeAddr

func SanitizeAddr(addr string) (string, error)

SanitizeAddr trims leading protocol scheme and port from the given IP address or hostname if present.

func SetStatusAndEnd

func SetStatusAndEnd(span trace.Span, err error)

SetStatusAndEnd sets the status of the span depending on the contents of the passed error and ends it.

func SquareSize

func SquareSize(lenShares int) uint64

SquareSize returns the size of the square based on the given amount of shares.

func ValidateAddr

func ValidateAddr(addr string) (string, error)

ValidateAddr sanitizes the given address and verifies that it is a valid IP or hostname. The sanitized address is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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