Documentation ¶
Index ¶
- Variables
- func InjectToBronze(land *Land, bronzeInstance any) error
- func InjectToTripod(tripodInstance any) error
- type BlockCycle
- type BlockVerifier
- type Bronze
- type Committer
- type DefaultBlockCycle
- type DefaultBlockVerifier
- type DefaultCommitter
- type DefaultInit
- type DefaultPreTxnHandler
- type DefaultTxnChecker
- type GrpcLand
- type Init
- type Land
- func (l *Land) GetReading(tripodName, rdName string) (Reading, error)
- func (l *Land) GetTripod(name string) *Tripod
- func (l *Land) GetTripodInstance(name string) interface{}
- func (l *Land) GetWriting(tripodName, wrName string) (Writing, error)
- func (l *Land) RangeList(fn func(*Tripod) error) error
- func (l *Land) RangeMap(fn func(string, *Tripod) error) error
- func (l *Land) SetBronzes(bronzes ...*Bronze)
- func (l *Land) SetTripods(tripods ...*Tripod)
- type PreTxnHandler
- type Tripod
- func (t *Tripod) AllReadingNames() []string
- func (t *Tripod) AllWritingNames() []string
- func (t *Tripod) CommitState() (common.Hash, error)
- func (t *Tripod) Delete(key []byte)
- func (t *Tripod) Discard()
- func (t *Tripod) DiscardAll()
- func (t *Tripod) Exist(key []byte) bool
- func (t *Tripod) ExistWriting(name string) bool
- func (t *Tripod) Get(key []byte) ([]byte, error)
- func (t *Tripod) GetByBlockHash(key []byte, block *types.Block) ([]byte, error)
- func (t *Tripod) GetCurrentBlock() (*types.Block, error)
- func (t *Tripod) GetCurrentCompactBlock() (*types.CompactBlock, error)
- func (t *Tripod) GetFinalized(key []byte) ([]byte, error)
- func (t *Tripod) GetReading(name string) dev.Reading
- func (t *Tripod) GetReadingFromLand(tripodName, funcName string) (dev.Reading, error)
- func (t *Tripod) GetWriting(name string) dev.Writing
- func (t *Tripod) GetWritingFromLand(tripodName, funcName string) (dev.Writing, error)
- func (t *Tripod) HandleError(err error, ctx *context.WriteContext, block *types.Block, ...) *types.Receipt
- func (t *Tripod) HandleEvent(ctx *context.WriteContext, block *types.Block, stxn *types.SignedTxn) *types.Receipt
- func (t *Tripod) HandleReceipt(ctx *context.WriteContext, receipt *types.Receipt, block *types.Block, ...)
- func (t *Tripod) Name() string
- func (t *Tripod) NextTxn()
- func (t *Tripod) PostExecute(block *types.Block, receipts map[common.Hash]*types.Receipt) error
- func (t *Tripod) Set(key, value []byte)
- func (t *Tripod) SetBlockCycle(bc BlockCycle)
- func (t *Tripod) SetBlockVerifier(bv BlockVerifier)
- func (t *Tripod) SetChainEnv(env *env.ChainEnv)
- func (t *Tripod) SetCommitter(c Committer)
- func (t *Tripod) SetInit(init Init)
- func (t *Tripod) SetInstance(tripodInstance any)
- func (t *Tripod) SetLand(land *Land)
- func (t *Tripod) SetP2pHandler(code int, handler dev.P2pHandler) *Tripod
- func (t *Tripod) SetPreTxnHandler(pth PreTxnHandler)
- func (t *Tripod) SetReadings(readings ...dev.Reading)
- func (t *Tripod) SetTxnChecker(tc types.TxnChecker)
- func (t *Tripod) SetWritings(wrs ...dev.Writing)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TripodInjectTag = "tripod" BronzeInjectTag = "bronze" OmitEmpty = "omitempty" )
Functions ¶
func InjectToBronze ¶ added in v1.2.0
InjectToBronze injects bronze into bronze.
func InjectToTripod ¶ added in v1.2.0
InjectToTripod injects tripod/bronze into tripod.
Types ¶
type BlockCycle ¶
type BlockCycle interface { StartBlock(block *Block) EndBlock(block *Block) FinalizeBlock(block *Block) }
type BlockVerifier ¶
type BlockVerifier interface {
VerifyBlock(block *Block) error
}
type Bronze ¶ added in v1.2.0
func NewBronzeWithName ¶ added in v1.2.0
func ResolveBronze ¶ added in v1.2.0
func (*Bronze) SetChainEnv ¶ added in v1.2.0
func (*Bronze) SetInstance ¶ added in v1.2.0
type DefaultBlockCycle ¶
type DefaultBlockCycle struct{}
func (*DefaultBlockCycle) EndBlock ¶
func (*DefaultBlockCycle) EndBlock(*Block)
func (*DefaultBlockCycle) FinalizeBlock ¶
func (*DefaultBlockCycle) FinalizeBlock(*Block)
func (*DefaultBlockCycle) StartBlock ¶
func (*DefaultBlockCycle) StartBlock(*Block)
type DefaultBlockVerifier ¶
type DefaultBlockVerifier struct{}
func (*DefaultBlockVerifier) VerifyBlock ¶
func (*DefaultBlockVerifier) VerifyBlock(*Block) error
type DefaultCommitter ¶
type DefaultCommitter struct{}
func (*DefaultCommitter) Commit ¶
func (*DefaultCommitter) Commit(*Block)
type DefaultInit ¶
type DefaultInit struct{}
func (*DefaultInit) InitChain ¶
func (*DefaultInit) InitChain(*Block)
type DefaultPreTxnHandler ¶
type DefaultPreTxnHandler struct{}
func (*DefaultPreTxnHandler) PreHandleTxn ¶
func (*DefaultPreTxnHandler) PreHandleTxn(*SignedTxn) error
type DefaultTxnChecker ¶
type DefaultTxnChecker struct{}
func (*DefaultTxnChecker) CheckTxn ¶
func (*DefaultTxnChecker) CheckTxn(*SignedTxn) error
type GrpcLand ¶
type GrpcLand struct {
// contains filtered or unexported fields
}
func NewGrpcLand ¶
type Land ¶
type Land struct {
// contains filtered or unexported fields
}
func (*Land) GetReading ¶
func (*Land) GetTripodInstance ¶
func (*Land) GetWriting ¶
func (*Land) SetBronzes ¶ added in v1.2.0
func (*Land) SetTripods ¶
type PreTxnHandler ¶
type PreTxnHandler interface {
PreHandleTxn(*SignedTxn) error
}
type Tripod ¶
type Tripod struct { *env.ChainEnv *Land BlockVerifier BlockVerifier TxnChecker types.TxnChecker Init Init BlockCycle BlockCycle PreTxnHandler PreTxnHandler Committer Committer Instance any // key: p2p-handler type code P2pHandlers map[int]dev.P2pHandler // contains filtered or unexported fields }
func NewTripodWithName ¶
func ResolveTripod ¶
func ResolveTripod(v interface{}) *Tripod
func (*Tripod) AllReadingNames ¶
func (*Tripod) AllWritingNames ¶
func (*Tripod) DiscardAll ¶
func (t *Tripod) DiscardAll()
func (*Tripod) ExistWriting ¶
func (*Tripod) GetByBlockHash ¶
func (*Tripod) GetCurrentCompactBlock ¶
func (t *Tripod) GetCurrentCompactBlock() (*types.CompactBlock, error)
func (*Tripod) GetReadingFromLand ¶
func (*Tripod) GetWritingFromLand ¶
func (*Tripod) HandleError ¶
func (*Tripod) HandleEvent ¶
func (*Tripod) HandleReceipt ¶
func (*Tripod) PostExecute ¶
func (*Tripod) SetBlockCycle ¶
func (t *Tripod) SetBlockCycle(bc BlockCycle)
func (*Tripod) SetBlockVerifier ¶
func (t *Tripod) SetBlockVerifier(bv BlockVerifier)
func (*Tripod) SetChainEnv ¶
func (*Tripod) SetCommitter ¶
func (*Tripod) SetInstance ¶
func (*Tripod) SetP2pHandler ¶
func (t *Tripod) SetP2pHandler(code int, handler dev.P2pHandler) *Tripod
func (*Tripod) SetPreTxnHandler ¶
func (t *Tripod) SetPreTxnHandler(pth PreTxnHandler)
func (*Tripod) SetReadings ¶
func (*Tripod) SetTxnChecker ¶
func (t *Tripod) SetTxnChecker(tc types.TxnChecker)
func (*Tripod) SetWritings ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.