common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2str

func Bytes2str(b []byte) string

func BytesToInt64

func BytesToInt64(buf []byte) int64

func BytesToInt64_LittleEndian

func BytesToInt64_LittleEndian(buf []byte) int64

func BytesToUint32

func BytesToUint32(buf []byte) uint32

func BytesToUint32_LittleEndian

func BytesToUint32_LittleEndian(buf []byte) uint32

func Int64ToBytes

func Int64ToBytes(i int64) []byte

func LoadLiveCells

func LoadLiveCells(client rpc.Client, key *indexer.SearchKey, capLimit uint64, latest, normal bool, filter func(cell *indexer.LiveCell) bool) ([]indexer.LiveCell, uint64, error)

func LoadLiveCellsWithSize

func LoadLiveCellsWithSize(client rpc.Client, key *indexer.SearchKey, capLimit, size uint64, latest, normal bool, filter func(cell *indexer.LiveCell) bool) ([]indexer.LiveCell, uint64, error)

func LoadLiveNormalCells

func LoadLiveNormalCells(client rpc.Client, key *indexer.SearchKey, capLimit uint64, filter func(cell *indexer.LiveCell) bool) ([]indexer.LiveCell, uint64, error)

func LoadOneLiveCell

func LoadOneLiveCell(client rpc.Client, key *indexer.SearchKey, capLimit uint64, latest, normal bool, filter func(cell *indexer.LiveCell) bool) ([]indexer.LiveCell, uint64, error)

func RetryReq

func RetryReq(retryTime int, delayTime time.Duration, reqFunc func() (interface{}, error)) (interface{}, error)

func SplitKeyName

func SplitKeyName(key []byte) (string, string)

func Str2bytes

func Str2bytes(s string) []byte

func Uint16ToBytes

func Uint16ToBytes(i uint16) []byte

func Uint64ToBytes

func Uint64ToBytes(i uint64) []byte

func Uint8ToBytes

func Uint8ToBytes(i uint8) []byte

Types

type ReqResp

type ReqResp struct {
	ErrNo  dascode.DAS_CODE `json:"errno"`
	ErrMsg string           `json:"errmsg"`
	Data   interface{}      `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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