util

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

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// KeyLedgertreeRoot is root of Ledgertree.
	KeyLedgertreeRoot = "LEDGERTREE_ROOT"
	// KeyLedgertreeLastnodehash is the Last node hash of Ledgertree.
	KeyLedgertreeLastnodehash = "LEDGERTREE_LASTNODEHASH"
	// KeyLedgertreeSize is the size of Ledgertree.
	KeyLedgertreeSize = "LEDGERTREE_SIZE"
	// KeyShardHeight is shard height.
	KeyShardHeight = "SHARD_HEIGHT_%d"
	// KeyStorageShardheight is shard height of storage node.
	KeyStorageShardheight = "STORAGE_SHARDHEIGHT"
	// KeyNodeCursor is node cursor.
	KeyNodeCursor = "NODE_CURSOR"
)

Variables

This section is empty.

Functions

func BytesToInt64

func BytesToInt64(buf []byte) int64

BytesToInt64 transform the byte array to int64.

func GetShardHeightKey

func GetShardHeightKey(shard uint32) []byte

GetShardHeightKey returns the shard key by given shard.

func Int64ToBytes

func Int64ToBytes(i int64) []byte

Int64ToBytes transform int64 to byte array.

func RedirectLog

func RedirectLog(content, fileAbsPath string) (string, error)

func ValToByte

func ValToByte(val interface{}) ([]byte, error)

ValToByte transform val to byte array.

Types

This section is empty.

Jump to

Keyboard shortcuts

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