Versions in this module Expand all Collapse all v3 v3.0.1 Dec 27, 2023 v3.0.0 Dec 23, 2022 Changes in this version + var UnSupportMarshalTypeFormat = "it is not support to marshal for type[%T]" + func DefaultMarshalFunc(data interface{}) []byte + type ConsensusWalOption struct + func NewDefaultConsensusWalOption() ConsensusWalOption + type ConsensusWalOptionFunc func(option *ConsensusWalOption) + func WithWriteMode(walWriteMode WalWriteMode) ConsensusWalOptionFunc + func WithWritePath(walWritePath string) ConsensusWalOptionFunc + type MarshalFunc func(data interface{}) []byte + type WalOp struct + type WalOpType int + const AsyncOpChanLength + const WalSyncOp + const WalTruncateOp + const WalWriteOp + type WalService interface + Close func() error + LastIndex func() (index uint64, err error) + Read func(index uint64) (data []byte, err error) + Sync func() error + TruncateFront func(index uint64) error + WalMode func() WalWriteMode + Write func(data interface{}) error + type WalServiceImpl struct + func NewWalService(mf MarshalFunc, opFuncs ...ConsensusWalOptionFunc) (*WalServiceImpl, error) + func (w *WalServiceImpl) Close() error + func (w *WalServiceImpl) LastIndex() (index uint64, err error) + func (w *WalServiceImpl) Read(index uint64) (data []byte, err error) + func (w *WalServiceImpl) Sync() error + func (w *WalServiceImpl) TruncateFront(index uint64) error + func (w *WalServiceImpl) WalMode() WalWriteMode + func (w *WalServiceImpl) Write(data interface{}) error + type WalWriteMode int + const AsyncWalWrite + const NonWalWrite + const SyncWalWrite + const WALWriteModeKey + const WalDir Other modules containing this package chainmaker.org/chainmaker/consensus-utils/v2