Documentation
¶
Index ¶
- Constants
- Variables
- func BytesToI64(bytes []byte) (v int64, e error)
- func BytesToU64(bytes []byte) (v uint64, e error)
- func FeedBin(hasher *crypto.Hasher256, data []byte)
- func FeedBinField(hasher *crypto.Hasher256, fieldName string, data []byte)
- func FeedDigestField(hasher *crypto.Hasher256, fieldName string, digest *crypto.Digest256)
- func FeedField(hasher *crypto.Hasher256, fieldName string, fn FeedBodyFn)
- func FeedInt32Field(hasher *crypto.Hasher256, fieldName string, n int32)
- func FeedInt64Field(hasher *crypto.Hasher256, fieldName string, n int64)
- func FeedText(hasher *crypto.Hasher256, data string)
- func FeedTextField(hasher *crypto.Hasher256, fieldName string, data string)
- func FeedTimestampField(hasher *crypto.Hasher256, fieldName string, ts int64)
- func GetCPUProfile(ctx *cli.Context) string
- func GetConfigFile(ctx *cli.Context) string
- func GetHomeDir() (string, error)
- func GetMemProfile(ctx *cli.Context) string
- func I64ToBytes(v int64) []byte
- func MsToTime(timeMs int64) time.Time
- func NewApp() *cli.App
- func NowMs() int64
- func ReadConfigToViper(ctx *cli.Context)
- func U64ToBytes(v uint64) []byte
- type Event
- type FeedBodyFn
Constants ¶
View Source
const (
UNSUBSCRIBE = true
)
Variables ¶
View Source
var ( ConfigFileFlag = cli.StringFlag{ Name: "config", Usage: "config file", Value: "../config.toml", } CPUProfileFlag = cli.StringFlag{ Name: "cpu-profile", Usage: "write cpu profile to file", } MemProfileFlag = cli.StringFlag{ Name: "mem-profile", Usage: "write memory profile to file", } )
View Source
var Flags = map[string]cli.Flag{ "p2p_port": cli.IntFlag{ Name: "p2p_port", Usage: "p2p network port", }, "http_port": cli.IntFlag{ Name: "http_port", Usage: "http rpc network port", }, "dbpath": cli.StringFlag{ Name: "dbpath", Usage: "braft leveldb path", }, "bch_host": cli.StringFlag{ Name: "bch-host", Usage: "the bch host that the node watch", }, "bch_height": cli.Int64Flag{ Name: "bch-height", Usage: "start watching height", }, "loglevel": cli.StringFlag{ Name: "loglevel", Usage: "log level, debug, info, warn, error or crti", }, }
Functions ¶
func BytesToI64 ¶
func BytesToU64 ¶
func FeedDigestField ¶
func FeedTimestampField ¶
func GetHomeDir ¶
func I64ToBytes ¶
func ReadConfigToViper ¶
ReadConfigToViper 把命令行传入的参数保存到viper配置里面
func U64ToBytes ¶
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
type FeedBodyFn ¶
Click to show internal directories.
Click to hide internal directories.