Documentation ¶
Index ¶
- func BytesToFloat64(bytes []byte) float64
- func BytesToUint16(b []byte) (v uint16)
- func BytesToUint32(b []byte) (v uint32)
- func BytesToUint64(b []byte) (v uint64)
- func FileExists(filepath string) bool
- func Float64ToBytes(float float64) []byte
- func GetLocalIP() string
- func GetUnixSocketFile(address string) (unixSocket string, fileExists bool)
- func Hash(key []byte) uint64
- func Parallel(actions ...func() error) error
- func ReadMessage(reader io.Reader) (m []byte, err error)
- func RetryForever(ctx context.Context, name string, fn func() error, waitTimes time.Duration)
- func Uint16toBytes(v uint16) (b []byte)
- func Uint32toBytes(v uint32) (b []byte)
- func Uint64toBytes(v uint64) (b []byte)
- func WriteMessage(writer io.Writer, m []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToFloat64 ¶
BytesToFloat64 converts from little endian 8 bytes to a float64
func BytesToUint16 ¶
BytesToUint16 converts big endian 2 bytes into uint16
func BytesToUint32 ¶
BytesToUint32 converts big endian 4 bytes into uint32
func BytesToUint64 ¶
BytesToUint64 converts big endian 8 bytes into uint64
func Float64ToBytes ¶
Float64ToBytes converts from a float64 to little endian 8 bytes
func GetUnixSocketFile ¶
GetUnixSocketFile checks vasto unix socket exists corresponding to the tcp socket.
func Parallel ¶
Parallel executes multiple actions concurrently. If error happens, one of the errors is returned.
func ReadMessage ¶
ReadMessage reads out the []byte for one message
func RetryForever ¶
RetryForever keeps retrying the fn unless the context is cancelled.
func Uint16toBytes ¶
Uint16toBytes converts uint16 into big endian 2 bytes
func Uint32toBytes ¶
Uint32toBytes converts uint32 into big endian 4 bytes
func Uint64toBytes ¶
Uint64toBytes converts uint64 into big endian 8 bytes
Types ¶
This section is empty.