utils

package
v7.0.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProtoDeterministicMarshal

func ProtoDeterministicMarshal(m proto.Message) ([]byte, error)

func WriteDurationLog

func WriteDurationLog(filename string, durationTime int64, function string, optionalParams ...string)

func WriteEventLog

func WriteEventLog(filename string, time time.Time, name string)

func WriteEventLogBeginBlock

func WriteEventLogBeginBlock(filename string, time time.Time, name string, height int64, numTxs int64)

func WriteEventLogQuery

func WriteEventLogQuery(filename string, time time.Time, name string, function string)

func WriteEventLogTx

func WriteEventLogTx(filename string, time time.Time, name string, function string, nonce string)

Types

type DurationLog

type DurationLog struct {
	Duration int64  `json:"duration"`
	Function string `json:"function"`
	Method   string `json:"method"`
	Nonce    string `json:"nonce"`
}

type EventLog

type EventLog struct {
	Datetime int64  `json:"datetime"`
	Name     string `json:"name"`
}

type EventLogBeginBlock

type EventLogBeginBlock struct {
	Datetime int64  `json:"datetime"`
	Name     string `json:"name"`
	Height   int64  `json:"height"`
	NumTxs   int64  `json:"numTxs"`
}

type EventLogQuery

type EventLogQuery struct {
	Datetime int64  `json:"datetime"`
	Name     string `json:"name"`
	Function string `json:"function"`
}

type EventLogTx

type EventLogTx struct {
	Datetime int64  `json:"datetime"`
	Name     string `json:"name"`
	Function string `json:"function"`
	Nonce    string `json:"nonce"`
}

type StringByteArrayMap

type StringByteArrayMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewStringByteArrayMap

func NewStringByteArrayMap() *StringByteArrayMap

func (*StringByteArrayMap) Delete

func (rm *StringByteArrayMap) Delete(key string)

func (*StringByteArrayMap) Load

func (rm *StringByteArrayMap) Load(key string) (value []byte, ok bool)

func (*StringByteArrayMap) Store

func (rm *StringByteArrayMap) Store(key string, value []byte)

type StringMap

type StringMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewStringMap

func NewStringMap() *StringMap

func (*StringMap) Delete

func (rm *StringMap) Delete(key string)

func (*StringMap) Load

func (rm *StringMap) Load(key string) (value string, ok bool)

func (*StringMap) Store

func (rm *StringMap) Store(key, value string)

Jump to

Keyboard shortcuts

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