test

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SendTypeUnicast = SendType(iota)
	SendTypeMulticast
	SendTypeBroadcast
)
View Source
const VarTest = "test"

Variables

This section is empty.

Functions

func AssertBlock added in v0.9.10

func AssertBlock(
	t *testing.T, blk module.Block,
	version int, height int64, id []byte, prevID []byte,
)

func AssertBlockInBM added in v0.9.10

func AssertBlockInBM(
	t *testing.T, bm module.BlockManager,
	version int, height int64, id []byte, prevID []byte,
)

func AssertLastBlock added in v0.9.10

func AssertLastBlock(
	t *testing.T, bm module.BlockManager,
	height int64, prevID []byte, version int,
)

func FinalizeBlock added in v0.9.10

func FinalizeBlock(
	t *testing.T, bm module.BlockManager, bc module.BlockCandidate,
)

func GetLastBlock added in v0.9.10

func GetLastBlock(t *testing.T, bm module.BlockManager) module.Block

func Go added in v0.9.10

func Go(f func())

func ImportBlock added in v0.9.10

func ImportBlock(
	t *testing.T, bm module.BlockManager,
	bc module.BlockCandidate, flag int,
) (resBc module.BlockCandidate, err error, cbErr error)

func ImportBlockByReader added in v0.9.10

func ImportBlockByReader(
	t *testing.T, bm module.BlockManager,
	r io.Reader, flag int,
) (resBc module.BlockCandidate, err error, cbErr error)

func NewRegulator added in v0.9.10

func NewRegulator() module.Regulator

func NodeInterconnect added in v0.9.10

func NodeInterconnect(nodes []*Node)

func PeerConnect added in v0.9.10

func PeerConnect(p1 Peer, p2 Peer)

func ProposeBlock added in v0.9.10

func ProposeBlock(
	bm module.BlockManager,
	prevID []byte, votes module.CommitVoteSet,
) (bc module.BlockCandidate, err error, cbError error)

func RegisterTransactionFactory added in v0.9.10

func RegisterTransactionFactory()

func ResetJobChan added in v0.9.10

func ResetJobChan()

Types

type Chain added in v0.9.10

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

func NewChain added in v0.9.10

func NewChain(
	t *testing.T,
	w module.Wallet,
	database db.Database,
	logger log.Logger,
	cvd module.CommitVoteSetDecoder,
	gsStr string,
) (*Chain, error)

func (*Chain) Backup added in v0.9.10

func (c *Chain) Backup(file string, extra []string) error

func (*Chain) BlockManager added in v0.9.10

func (c *Chain) BlockManager() module.BlockManager

func (*Chain) CID added in v0.9.10

func (c *Chain) CID() int

func (*Chain) Channel added in v0.9.10

func (c *Chain) Channel() string

func (*Chain) ChildrenLimit added in v1.0.0

func (c *Chain) ChildrenLimit() int

func (*Chain) CommitVoteSetDecoder added in v0.9.10

func (c *Chain) CommitVoteSetDecoder() module.CommitVoteSetDecoder

func (*Chain) ConcurrencyLevel added in v0.9.10

func (c *Chain) ConcurrencyLevel() int

func (*Chain) Consensus added in v0.9.10

func (c *Chain) Consensus() module.Consensus

func (*Chain) Database added in v0.9.10

func (c *Chain) Database() db.Database

func (*Chain) DefaultWaitTimeout added in v0.9.10

func (c *Chain) DefaultWaitTimeout() time.Duration

func (*Chain) Genesis added in v0.9.10

func (c *Chain) Genesis() []byte

func (*Chain) GenesisStorage added in v0.9.10

func (c *Chain) GenesisStorage() module.GenesisStorage

func (*Chain) Import added in v0.9.10

func (c *Chain) Import(src string, height int64) error

func (*Chain) Init added in v0.9.10

func (c *Chain) Init() error

func (*Chain) IsStarted added in v0.9.10

func (c *Chain) IsStarted() bool

func (*Chain) IsStopped added in v0.9.10

func (c *Chain) IsStopped() bool

func (*Chain) Logger added in v0.9.10

func (c *Chain) Logger() log.Logger

func (*Chain) MaxBlockTxBytes added in v0.9.10

func (c *Chain) MaxBlockTxBytes() int

func (*Chain) MaxWaitTimeout added in v0.9.10

func (c *Chain) MaxWaitTimeout() time.Duration

func (*Chain) MetricContext added in v0.9.10

func (c *Chain) MetricContext() context.Context

func (*Chain) NID added in v0.9.10

func (c *Chain) NID() int

func (*Chain) NephewsLimit added in v1.0.0

func (c *Chain) NephewsLimit() int

func (*Chain) NetID added in v0.9.10

func (c *Chain) NetID() int

func (*Chain) NetworkManager added in v0.9.10

func (c *Chain) NetworkManager() module.NetworkManager

func (*Chain) NormalTxPoolSize added in v0.9.10

func (c *Chain) NormalTxPoolSize() int

func (*Chain) PatchDecoder added in v0.9.10

func (c *Chain) PatchDecoder() module.PatchDecoder

func (*Chain) PatchTxPoolSize added in v0.9.10

func (c *Chain) PatchTxPoolSize() int

func (*Chain) Prune added in v0.9.10

func (c *Chain) Prune(gs string, dbt string, height int64) error

func (*Chain) Regulator added in v0.9.10

func (c *Chain) Regulator() module.Regulator

func (*Chain) Reset added in v0.9.10

func (c *Chain) Reset() error

func (*Chain) RunTask added in v0.9.10

func (c *Chain) RunTask(task string, params json.RawMessage) error

func (*Chain) ServiceManager added in v0.9.10

func (c *Chain) ServiceManager() module.ServiceManager

func (*Chain) SetBlockManager added in v0.9.10

func (c *Chain) SetBlockManager(bm module.BlockManager)

func (*Chain) SetServiceManager added in v0.9.10

func (c *Chain) SetServiceManager(sm module.ServiceManager)

func (*Chain) Start added in v0.9.10

func (c *Chain) Start() error

func (*Chain) State added in v0.9.10

func (c *Chain) State() (string, int64, error)

func (*Chain) Stop added in v0.9.10

func (c *Chain) Stop() error

func (*Chain) Term added in v0.9.10

func (c *Chain) Term() error

func (*Chain) TransactionTimeout added in v0.9.10

func (c *Chain) TransactionTimeout() time.Duration

func (*Chain) Verify added in v0.9.10

func (c *Chain) Verify() error

func (*Chain) Wallet added in v0.9.10

func (c *Chain) Wallet() module.Wallet

type Fixture added in v0.9.10

type Fixture struct {
	// default node
	*Node
	BaseConfig *FixtureConfig

	// all nodes
	Nodes []*Node
}

func NewFixture added in v0.9.10

func NewFixture(t *testing.T, o ...FixtureOption) *Fixture

func (*Fixture) AddNode added in v0.9.10

func (f *Fixture) AddNode(o ...FixtureOption) *Node

func (*Fixture) AddNodes added in v0.9.10

func (f *Fixture) AddNodes(n int, o ...FixtureOption) []*Node

func (*Fixture) Close added in v0.9.10

func (f *Fixture) Close()

type FixtureConfig added in v0.9.10

type FixtureConfig struct {
	T                 *testing.T
	MerkleRoot        []byte
	MerkleLeaves      int64
	MerkleLastVotes   []byte
	Prefix            string
	Dbase             func() db.Database
	CVSD              module.CommitVoteSetDecoder
	NewPlatform       func(ctx *NodeContext) base.Platform
	NewSM             func(ctx *NodeContext) module.ServiceManager
	NewBM             func(ctx *NodeContext) module.BlockManager
	NewCS             func(ctx *NodeContext) module.Consensus
	AddValidatorNodes int
	Genesis           string
	Wallet            module.Wallet
	AddDefaultNode    *bool
}

func NewFixtureConfig added in v0.9.10

func NewFixtureConfig(t *testing.T, o ...FixtureOption) *FixtureConfig

func (*FixtureConfig) ApplyOption added in v0.9.10

func (cf *FixtureConfig) ApplyOption(o ...FixtureOption) *FixtureConfig

func (*FixtureConfig) Override added in v0.9.10

func (cf *FixtureConfig) Override(cf2 *FixtureConfig) *FixtureConfig

type FixtureOption added in v0.9.10

type FixtureOption func(cf *FixtureConfig) *FixtureConfig

func AddDefaultNode added in v0.9.10

func AddDefaultNode(v bool) FixtureOption

func AddValidatorNodes added in v0.9.10

func AddValidatorNodes(n int) FixtureOption

AddValidatorNodes option makes n validators and the first validator becomes default node

func UseConfig added in v0.9.10

func UseConfig(cf2 *FixtureConfig) FixtureOption

func UseDB added in v0.9.10

func UseDB(dbase db.Database) FixtureOption

func UseGenesis added in v0.9.10

func UseGenesis(gs string) FixtureOption

func UseWallet added in v0.9.10

func UseWallet(w module.Wallet) FixtureOption

type NetworkManager added in v0.9.10

type NetworkManager struct {
	module.NetworkManager
	// contains filtered or unexported fields
}

func NewNetworkManager added in v0.9.10

func NewNetworkManager(t *testing.T, a module.Address) *NetworkManager

func (*NetworkManager) Connect added in v0.9.10

func (n *NetworkManager) Connect(n2 *NetworkManager)

func (*NetworkManager) GetPeers added in v0.9.10

func (n *NetworkManager) GetPeers() []module.PeerID

func (*NetworkManager) ID added in v0.9.10

func (n *NetworkManager) ID() module.PeerID

func (*NetworkManager) NewPeerFor added in v0.9.10

func (*NetworkManager) RegisterReactor added in v0.9.10

func (n *NetworkManager) RegisterReactor(name string, mpi module.ProtocolInfo, reactor module.Reactor, piList []module.ProtocolInfo, priority uint8) (module.ProtocolHandler, error)

func (*NetworkManager) RegisterReactorForStreams added in v0.9.10

func (n *NetworkManager) RegisterReactorForStreams(name string, pi module.ProtocolInfo, reactor module.Reactor, piList []module.ProtocolInfo, priority uint8) (module.ProtocolHandler, error)

func (*NetworkManager) SetRole added in v0.9.10

func (n *NetworkManager) SetRole(version int64, role module.Role, peers ...module.PeerID)

func (*NetworkManager) UnregisterReactor added in v0.9.10

func (n *NetworkManager) UnregisterReactor(reactor module.Reactor) error

type Node added in v0.9.10

type Node struct {
	*testing.T
	Chain *Chain
	Base  string

	NM        *NetworkManager
	SM        module.ServiceManager
	BM        module.BlockManager
	CS        module.Consensus
	PrevBlock module.Block
	LastBlock module.Block
	Platform  base.Platform
	// contains filtered or unexported fields
}

func NewNode added in v0.9.10

func NewNode(t *testing.T, o ...FixtureOption) *Node

func (*Node) Address added in v0.9.10

func (t *Node) Address() module.Address

func (*Node) AssertLastBlock added in v0.9.10

func (t *Node) AssertLastBlock(
	prev module.Block, version int,
)

func (*Node) Close added in v0.9.10

func (t *Node) Close()

func (*Node) FinalizeBlock added in v0.9.10

func (t *Node) FinalizeBlock(bc module.BlockCandidate)

func (*Node) GetLastBlock added in v0.9.10

func (t *Node) GetLastBlock() module.Block

func (*Node) ImportBlock added in v0.9.10

func (t *Node) ImportBlock(bc module.BlockCandidate, flag int)

func (*Node) ImportBlockByReader added in v0.9.10

func (t *Node) ImportBlockByReader(
	r io.Reader, flag int,
) module.BlockCandidate

func (*Node) ImportFinalizeBlockByReader added in v0.9.10

func (t *Node) ImportFinalizeBlockByReader(r io.Reader)

func (*Node) NewVoteListForLastBlock added in v0.9.10

func (t *Node) NewVoteListForLastBlock() module.CommitVoteSet

func (*Node) ProposeBlock added in v0.9.10

func (t *Node) ProposeBlock(
	votes module.CommitVoteSet,
) module.BlockCandidate

func (*Node) ProposeFinalizeBlock added in v0.9.10

func (t *Node) ProposeFinalizeBlock(votes module.CommitVoteSet)

func (*Node) ProposeFinalizeBlockWithTX added in v0.9.10

func (t *Node) ProposeFinalizeBlockWithTX(
	votes module.CommitVoteSet, txJson string,
)

func (*Node) ProposeImportFinalizeBlock added in v0.9.10

func (t *Node) ProposeImportFinalizeBlock(
	votes module.CommitVoteSet,
)

func (*Node) ProposeImportFinalizeBlockWithTX added in v0.9.10

func (t *Node) ProposeImportFinalizeBlockWithTX(
	votes module.CommitVoteSet, txJson string,
)

type NodeContext added in v0.9.10

type NodeContext struct {
	C        *Chain
	Config   *FixtureConfig
	Base     string
	Platform base.Platform
	CM       contract.ContractManager
	EM       eeproxy.Manager
}

type Packet added in v0.9.10

type Packet struct {
	SendType SendType
	Src      module.PeerID

	// DstSpec specifies destination.
	// DstSpec is PeerID if SendType is SendTypeUnicast.
	// DstSpec is Role if SendType is SendTypeMulticast.
	// DstSpec is BroadcastType if SendType is SendTypeBroadcast.
	DstSpec interface{}
	MPI     module.ProtocolInfo
	PI      module.ProtocolInfo
	Data    []byte
}

type Peer added in v0.9.10

type Peer interface {
	ID() module.PeerID
	// contains filtered or unexported methods
}

type SendType added in v0.9.10

type SendType int

type ServiceManager added in v0.9.10

type ServiceManager struct {
	module.ServiceManager
	// contains filtered or unexported fields
}

func NewServiceManager added in v0.9.10

func NewServiceManager(
	c *Chain,
	plt base.Platform,
	cm contract.ContractManager,
	em eeproxy.Manager,
) *ServiceManager

func (*ServiceManager) CreateInitialTransition added in v0.9.10

func (sm *ServiceManager) CreateInitialTransition(
	result []byte,
	nextValidators module.ValidatorList,
) (module.Transition, error)

func (*ServiceManager) CreateSyncTransition added in v0.9.10

func (sm *ServiceManager) CreateSyncTransition(transition module.Transition, result []byte, vlHash []byte) module.Transition

func (*ServiceManager) CreateTransition added in v0.9.10

func (sm *ServiceManager) CreateTransition(parent module.Transition, txs module.TransactionList, bi module.BlockInfo, csi module.ConsensusInfo, validated bool) (module.Transition, error)

func (*ServiceManager) ExportResult added in v0.9.10

func (sm *ServiceManager) ExportResult(result []byte, vh []byte, dst db.Database) error

func (*ServiceManager) Finalize added in v0.9.10

func (sm *ServiceManager) Finalize(transition module.Transition, opt int) error

func (*ServiceManager) GenesisTransactionFromBytes added in v0.9.10

func (sm *ServiceManager) GenesisTransactionFromBytes(b []byte, blockVersion int) (module.Transaction, error)

func (*ServiceManager) GetChainID added in v0.9.10

func (sm *ServiceManager) GetChainID(result []byte) (int64, error)

func (*ServiceManager) GetMembers added in v0.9.10

func (sm *ServiceManager) GetMembers(result []byte) (module.MemberList, error)

func (*ServiceManager) GetMinimizeBlockGen added in v0.9.10

func (sm *ServiceManager) GetMinimizeBlockGen(result []byte) bool

func (*ServiceManager) GetNetworkID added in v0.9.10

func (sm *ServiceManager) GetNetworkID(result []byte) (int64, error)

func (*ServiceManager) GetNextBlockVersion added in v0.9.10

func (sm *ServiceManager) GetNextBlockVersion(result []byte) int

func (*ServiceManager) GetPatches added in v0.9.10

func (*ServiceManager) GetRoundLimit added in v0.9.10

func (sm *ServiceManager) GetRoundLimit(result []byte, vl int) int64

func (*ServiceManager) ImportResult added in v0.9.10

func (sm *ServiceManager) ImportResult(result []byte, vh []byte, src db.Database) error

func (*ServiceManager) PatchTransition added in v0.9.10

func (sm *ServiceManager) PatchTransition(transition module.Transition, patches module.TransactionList, bi module.BlockInfo) module.Transition

func (*ServiceManager) ProposeTransition added in v0.9.10

func (sm *ServiceManager) ProposeTransition(parent module.Transition, bi module.BlockInfo, csi module.ConsensusInfo) (module.Transition, error)

func (*ServiceManager) ReceiptListFromResult added in v0.9.10

func (sm *ServiceManager) ReceiptListFromResult(result []byte, g module.TransactionGroup) (module.ReceiptList, error)

func (*ServiceManager) SendTransaction added in v0.9.10

func (sm *ServiceManager) SendTransaction(tx interface{}) ([]byte, error)

func (*ServiceManager) SendTransactionAndWait added in v0.9.10

func (sm *ServiceManager) SendTransactionAndWait(tx interface{}) ([]byte, <-chan interface{}, error)

func (*ServiceManager) TransactionFromBytes added in v0.9.10

func (sm *ServiceManager) TransactionFromBytes(b []byte, blockVersion int) (module.Transaction, error)

func (*ServiceManager) TransactionListFromHash added in v0.9.10

func (sm *ServiceManager) TransactionListFromHash(hash []byte) module.TransactionList

func (*ServiceManager) TransactionListFromSlice added in v0.9.10

func (sm *ServiceManager) TransactionListFromSlice(txs []module.Transaction, version int) module.TransactionList

func (*ServiceManager) ValidatorListFromHash added in v0.9.10

func (sm *ServiceManager) ValidatorListFromHash(hash []byte) module.ValidatorList

func (*ServiceManager) WaitForTransaction added in v0.9.10

func (sm *ServiceManager) WaitForTransaction(parent module.Transition, bi module.BlockInfo, cb func()) bool

func (*ServiceManager) WaitTransactionResult added in v0.9.10

func (sm *ServiceManager) WaitTransactionResult(id []byte) (<-chan interface{}, error)

type SimplePeer added in v0.9.10

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

func NewPeer added in v0.9.10

func NewPeer(t *testing.T) *SimplePeer

func NewPeerWithAddress added in v0.9.10

func NewPeerWithAddress(t *testing.T, w module.Wallet) *SimplePeer

func (*SimplePeer) Address added in v0.9.10

func (p *SimplePeer) Address() module.Address

func (*SimplePeer) Connect added in v0.9.10

func (p *SimplePeer) Connect(p2 Peer) *SimplePeer

func (*SimplePeer) ID added in v0.9.10

func (p *SimplePeer) ID() module.PeerID

func (*SimplePeer) RegisterProto added in v0.9.10

func (p *SimplePeer) RegisterProto(mpi module.ProtocolInfo) *SimplePeerHandler

func (*SimplePeer) Wallet added in v0.9.10

func (p *SimplePeer) Wallet() module.Wallet

type SimplePeerHandler added in v0.9.10

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

func (*SimplePeerHandler) Address added in v0.9.10

func (h *SimplePeerHandler) Address() module.Address

func (*SimplePeerHandler) AssertReceiveUnicast added in v0.9.10

func (h *SimplePeerHandler) AssertReceiveUnicast(pi module.ProtocolInfo, m interface{})

func (*SimplePeerHandler) Broadcast added in v0.9.10

func (h *SimplePeerHandler) Broadcast(
	pi module.ProtocolInfo,
	m interface{},
	btype module.BroadcastType,
	cb func(bool, error),
)

func (*SimplePeerHandler) Multicast added in v0.9.10

func (h *SimplePeerHandler) Multicast(
	pi module.ProtocolInfo,
	m interface{},
	role module.Role,
	cb func(bool, error),
)

func (*SimplePeerHandler) Peer added in v0.9.10

func (h *SimplePeerHandler) Peer() *SimplePeer

func (*SimplePeerHandler) Receive added in v0.9.10

func (h *SimplePeerHandler) Receive(
	pi module.ProtocolInfo,
	expMsg interface{},
	outMsg interface{},
) *Packet

func (*SimplePeerHandler) Unicast added in v0.9.10

func (h *SimplePeerHandler) Unicast(
	pi module.ProtocolInfo,
	m interface{},
	cb func(bool, error),
)

func (*SimplePeerHandler) Wallet added in v0.9.10

func (h *SimplePeerHandler) Wallet() module.Wallet

type Transaction added in v0.9.10

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

func NewTransaction added in v0.9.10

func NewTransaction() *Transaction

func NewTx added in v0.9.10

func NewTx() *Transaction

func (*Transaction) Bytes added in v0.9.10

func (t *Transaction) Bytes() []byte

func (*Transaction) ClearCache added in v0.9.10

func (t *Transaction) ClearCache()

func (*Transaction) Dispose added in v0.9.10

func (t *Transaction) Dispose()

func (*Transaction) Equal added in v0.9.10

func (t *Transaction) Equal(object trie.Object) bool

func (*Transaction) Execute added in v0.9.10

func (t *Transaction) Execute(ctx contract.Context, estimate bool) (txresult.Receipt, error)

func (*Transaction) Flush added in v0.9.10

func (t *Transaction) Flush() error

func (*Transaction) From added in v0.9.10

func (t *Transaction) From() module.Address

func (*Transaction) GetHandler added in v0.9.10

func (*Transaction) Group added in v0.9.10

func (t *Transaction) Group() module.TransactionGroup

func (*Transaction) Hash added in v0.9.10

func (t *Transaction) Hash() []byte

func (*Transaction) ID added in v0.9.10

func (t *Transaction) ID() []byte

func (*Transaction) IsSkippable added in v0.9.10

func (t *Transaction) IsSkippable() bool

func (*Transaction) Nonce added in v0.9.10

func (t *Transaction) Nonce() *big.Int

func (*Transaction) PreValidate added in v0.9.10

func (t *Transaction) PreValidate(wc state.WorldContext, update bool) error

func (*Transaction) Prepare added in v0.9.10

func (t *Transaction) Prepare(ctx contract.Context) (state.WorldContext, error)

func (*Transaction) Reset added in v0.9.10

func (t *Transaction) Reset(s db.Database, k []byte) error

func (*Transaction) Resolve added in v0.9.10

func (t *Transaction) Resolve(builder merkle.Builder) error

func (*Transaction) SetNextBlockVersion added in v0.9.10

func (t *Transaction) SetNextBlockVersion(v *int32) *Transaction

func (*Transaction) SetValidators added in v0.9.10

func (t *Transaction) SetValidators(addrs ...module.Address) *Transaction

func (*Transaction) SetValidatorsAddresser added in v0.9.10

func (t *Transaction) SetValidatorsAddresser(addrs ...addresser) *Transaction

func (*Transaction) SetValidatorsNode added in v0.9.10

func (t *Transaction) SetValidatorsNode(addrs ...*Node) *Transaction

func (*Transaction) SetVarTest added in v0.9.10

func (t *Transaction) SetVarTest(v *string) *Transaction

func (Transaction) String added in v0.9.10

func (t Transaction) String() string

func (*Transaction) Timestamp added in v0.9.10

func (t *Transaction) Timestamp() int64

func (*Transaction) To added in v0.9.10

func (t *Transaction) To() module.Address

func (*Transaction) ToJSON added in v0.9.10

func (t *Transaction) ToJSON(version module.JSONVersion) (interface{}, error)

func (*Transaction) ValidateNetwork added in v0.9.10

func (t *Transaction) ValidateNetwork(nid int) bool

func (*Transaction) Verify added in v0.9.10

func (t *Transaction) Verify() error

func (*Transaction) Version added in v0.9.10

func (t *Transaction) Version() int

type WAL added in v0.9.10

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

func NewWAL added in v0.9.10

func NewWAL() *WAL

func (*WAL) OpenForRead added in v0.9.10

func (w *WAL) OpenForRead(id string) (consensus.WALReader, error)

func (*WAL) OpenForWrite added in v0.9.10

func (w *WAL) OpenForWrite(id string, cfg *consensus.WALConfig) (consensus.WALWriter, error)

type WALReader added in v0.9.10

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

func (*WALReader) Close added in v0.9.10

func (r *WALReader) Close() error

func (*WALReader) CloseAndRepair added in v0.9.10

func (r *WALReader) CloseAndRepair() error

func (*WALReader) Read added in v0.9.10

func (r *WALReader) Read(v interface{}) ([]byte, error)

func (*WALReader) ReadBytes added in v0.9.10

func (r *WALReader) ReadBytes() ([]byte, error)

type WALWriter added in v0.9.10

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

func (*WALWriter) Close added in v0.9.10

func (w *WALWriter) Close() error

func (*WALWriter) Sync added in v0.9.10

func (w *WALWriter) Sync() error

func (*WALWriter) WriteBytes added in v0.9.10

func (w *WALWriter) WriteBytes(bytes []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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