Documentation ¶
Overview ¶
Package prprocessor provides the processor of operations
Index ¶
- Variables
- func LogEventProcessor(pr Processor, key string, e *zerolog.Event) *zerolog.Event
- type ConcurrentOperationsProcessor
- func (co *ConcurrentOperationsProcessor) Cancel() error
- func (co *ConcurrentOperationsProcessor) Close() error
- func (co *ConcurrentOperationsProcessor) OperationsTree() (tree.FixedTree, error)
- func (co *ConcurrentOperationsProcessor) Process(index uint64, op operation.Operation) error
- func (co *ConcurrentOperationsProcessor) Start(ctx context.Context, workFilter func(state.Processor) error) *ConcurrentOperationsProcessor
- func (co *ConcurrentOperationsProcessor) StatesTree() (tree.FixedTree, []state.State, error)
- type DummyProcessor
- func (pp *DummyProcessor) Block() block.Block
- func (pp *DummyProcessor) Cancel() error
- func (pp *DummyProcessor) Fact() base.ProposalFact
- func (pp *DummyProcessor) New(sfs base.SignedBallotFact, initVoteproof base.Voteproof) (Processor, error)
- func (pp *DummyProcessor) Prepare(ctx context.Context) (block.Block, error)
- func (pp *DummyProcessor) Save(ctx context.Context) error
- func (pp *DummyProcessor) SetACCEPTVoteproof(voteproof base.Voteproof) error
- func (pp *DummyProcessor) SetState(s State)
- func (pp *DummyProcessor) SignedFact() base.SignedBallotFact
- func (pp *DummyProcessor) State() State
- func (pp *DummyProcessor) Statics() map[string]interface{}
- type OperationProcessor
- type Processor
- type ProcessorNewFunc
- type Processors
- func (pps *Processors) Current() Processor
- func (pps *Processors) CurrentState(fact valuehash.Hash) State
- func (*Processors) Initialize() error
- func (pps *Processors) NewProposal(ctx context.Context, sfs base.SignedBallotFact, initVoteproof base.Voteproof) <-chan Result
- func (pps *Processors) Save(ctx context.Context, fact valuehash.Hash, acceptVoteproof base.Voteproof) <-chan Result
- func (pps *Processors) SetCurrent(pp Processor)
- type Result
- type State
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PrepareFailedError = util.NewError("failed to prepare") SaveFailedError = util.NewError("failed to save") )
Functions ¶
Types ¶
type ConcurrentOperationsProcessor ¶
type ConcurrentOperationsProcessor struct { sync.RWMutex *logging.Logging // contains filtered or unexported fields }
func (*ConcurrentOperationsProcessor) Cancel ¶
func (co *ConcurrentOperationsProcessor) Cancel() error
func (*ConcurrentOperationsProcessor) Close ¶
func (co *ConcurrentOperationsProcessor) Close() error
func (*ConcurrentOperationsProcessor) OperationsTree ¶
func (co *ConcurrentOperationsProcessor) OperationsTree() (tree.FixedTree, error)
func (*ConcurrentOperationsProcessor) Process ¶
func (co *ConcurrentOperationsProcessor) Process(index uint64, op operation.Operation) error
func (*ConcurrentOperationsProcessor) Start ¶
func (co *ConcurrentOperationsProcessor) Start( ctx context.Context, workFilter func(state.Processor) error, ) *ConcurrentOperationsProcessor
func (*ConcurrentOperationsProcessor) StatesTree ¶
type DummyProcessor ¶
type DummyProcessor struct { sync.RWMutex S State P base.SignedBallotFact B block.Block IV base.Voteproof AV base.Voteproof PF func(context.Context) (block.Block, error) SF func(context.Context) error // contains filtered or unexported fields }
func (*DummyProcessor) Block ¶
func (pp *DummyProcessor) Block() block.Block
func (*DummyProcessor) Cancel ¶
func (pp *DummyProcessor) Cancel() error
func (*DummyProcessor) Fact ¶
func (pp *DummyProcessor) Fact() base.ProposalFact
func (*DummyProcessor) New ¶
func (pp *DummyProcessor) New(sfs base.SignedBallotFact, initVoteproof base.Voteproof) (Processor, error)
func (*DummyProcessor) SetACCEPTVoteproof ¶
func (pp *DummyProcessor) SetACCEPTVoteproof(voteproof base.Voteproof) error
func (*DummyProcessor) SetState ¶
func (pp *DummyProcessor) SetState(s State)
func (*DummyProcessor) SignedFact ¶
func (pp *DummyProcessor) SignedFact() base.SignedBallotFact
func (*DummyProcessor) State ¶
func (pp *DummyProcessor) State() State
func (*DummyProcessor) Statics ¶
func (pp *DummyProcessor) Statics() map[string]interface{}
type OperationProcessor ¶
type ProcessorNewFunc ¶
type Processors ¶
type Processors struct { sync.RWMutex *logging.Logging *util.ContextDaemon // contains filtered or unexported fields }
func NewProcessors ¶
func NewProcessors(newFunc ProcessorNewFunc, proposalChecker func(base.ProposalFact) error) *Processors
func (*Processors) Current ¶
func (pps *Processors) Current() Processor
func (*Processors) CurrentState ¶
func (pps *Processors) CurrentState(fact valuehash.Hash) State
func (*Processors) Initialize ¶
func (*Processors) Initialize() error
func (*Processors) NewProposal ¶
func (pps *Processors) NewProposal( ctx context.Context, sfs base.SignedBallotFact, initVoteproof base.Voteproof, ) <-chan Result
func (*Processors) SetCurrent ¶
func (pps *Processors) SetCurrent(pp Processor)
Click to show internal directories.
Click to hide internal directories.