common

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNodeID added in v0.1.3

func CreateNodeID(version uint, name string) types.NodeID

func CreateNodeVersionName added in v0.1.3

func CreateNodeVersionName(version uint, name string) types.NodeVersionName

func GenerateRandomUInt64

func GenerateRandomUInt64() uint64

func GetSmallestUInt64FromArray

func GetSmallestUInt64FromArray(randArr []uint64) uint64

func RemoveFromSlice

func RemoveFromSlice[T any](slice []*T, index int) []*T

Types

type Address

type Address string

type Cmd

type Cmd int64
const (
	CmdExit Cmd = iota
	CmdStop
	CmdStart
)

type Data

type Data interface{}

type DataBytes

type DataBytes []byte

type File

type File struct {
	// contains filtered or unexported fields
}

func OpenFile

func OpenFile(filePath string, fileType Type) (*File, error)

func (*File) Close

func (f *File) Close()

func (*File) Parse

func (f *File) Parse(out interface{}) error

type Hash

type Hash []byte

type Sig

type Sig []byte

type StructBytes

type StructBytes struct {
}

func (*StructBytes) Bytes

func (sb *StructBytes) Bytes() []byte

type Timestamp

type Timestamp int64

type Type

type Type string
const (
	JSON Type = "JSON"
	YML  Type = "YML"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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