commands

package
v0.0.0-...-0333012 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2018 License: LGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Serve

func Serve(cmd *cobra.Command, args []string)

Types

type EthNetwork

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

func NewEthNetwork

func NewEthNetwork(netid, url string, storage *KVStorage, logfunc EventLogFunc) *EthNetwork

func (*EthNetwork) Load

func (s *EthNetwork) Load() (lastBlock uint64, lastTxIndex uint, err error)

func (*EthNetwork) Process

func (s *EthNetwork) Process(tx *types.Transaction, r *types.Receipt) error

func (*EthNetwork) Save

func (s *EthNetwork) Save(lastBlock uint64, lastTxIndex uint) error

func (*EthNetwork) Start

func (s *EthNetwork) Start() error

func (*EthNetwork) Stop

func (s *EthNetwork) Stop()

func (*EthNetwork) TxInfo

func (s *EthNetwork) TxInfo(txid string) string

type EventLogFunc

type EventLogFunc func(netid, alert, message string, tx *types.Transaction, r *types.Receipt)

type KVStorage

type KVStorage struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewKVStorage

func NewKVStorage(filename string) (*KVStorage, error)

func (*KVStorage) Get

func (kv *KVStorage) Get(k string) (string, bool)

func (*KVStorage) Put

func (kv *KVStorage) Put(k, v string) error

type Network

type Network interface {
	Start() error
	TxInfo(tx string) string
	Stop()
}

Jump to

Keyboard shortcuts

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