global

package
v0.0.0-...-d9e9996 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VMPrivRing0 ring 0 VMs
	VMPrivRing0 = 0

	// VMPrivRing3 ring 3 VMs
	VMPrivRing3 = 3
)
View Source
const (
	// SafeModel 表示安全的同步
	SafeModel = iota
	// Normal 表示正常状态
	Normal
)
View Source
const (
	// SRootChainName name of amper chain
	SRootChainName = "amper"
	// SBlockChainConfig configuration file name of amper chain
	SBlockChainConfig = "amper.json"
)

Variables

This section is empty.

Functions

func F

func F(bytes []byte) string

F print byte slice data as hex string

func GHeader

func GHeader() *pb.Header

GHeader make empty header with logid

func GenNonce

func GenNonce() string

GenNonce generate random nonce

func Glogid

func Glogid() string

Glogid generate global log id

func PathExists

func PathExists(path string) bool

PathExists check if the specified path exists

func SetSeed

func SetSeed() error

SetSeed set random seed

func UniqMacID

func UniqMacID() string

UniqMacID return global unique ID

Types

type MarkPoint

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

MarkPoint define data structure of marked point

type XContext

type XContext struct {
	Timer *XTimer
}

XContext define the common context

type XTimer

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

XTimer define the timestamps and marked points

func NewXTimer

func NewXTimer() *XTimer

NewXTimer create new XTimer instance

func (*XTimer) Mark

func (timer *XTimer) Mark(tag string)

Mark mark a point and record the tag of the point with time delta

func (*XTimer) Print

func (timer *XTimer) Print() string

Print all record points and timestamp information

Jump to

Keyboard shortcuts

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