Documentation
¶
Index ¶
- func NewAuditEvent(epoch uint64) event.Event
- func NewBasicIncomeCollectEvent(epoch uint64) event.Event
- func NewBasicIncomeDistributeEvent(epoch uint64) event.Event
- type AlphabetState
- type AuditEvent
- type AuditProcessor
- type BasicIncomeCollectEvent
- type BasicIncomeDistributeEvent
- type BasicIncomeInitializer
- type Option
- type Prm
- type Processor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuditEvent ¶
NewAuditEvent creates new AuditEvent for epoch.
func NewBasicIncomeCollectEvent ¶
NewBasicIncomeCollectEvent for epoch.
func NewBasicIncomeDistributeEvent ¶
NewBasicIncomeDistributeEvent for epoch.
Types ¶
type AlphabetState ¶ added in v0.18.0
type AlphabetState interface {
IsAlphabet() bool
}
AlphabetState is a callback interface for inner ring global state.
type AuditEvent ¶
type AuditEvent struct {
// contains filtered or unexported fields
}
AuditEvent is an event of the start of cash settlements for data audit.
func (AuditEvent) Epoch ¶
func (e AuditEvent) Epoch() uint64
Epoch returns the number of the epoch in which the event was generated.
func (AuditEvent) MorphEvent ¶
func (e AuditEvent) MorphEvent()
MorphEvent implements Neo:Morph event.
type AuditProcessor ¶
type AuditProcessor interface { // Must process data audit conducted in epoch. ProcessAuditSettlements(epoch uint64) }
AuditProcessor is an interface of data audit fee processor.
type BasicIncomeCollectEvent ¶
type BasicIncomeCollectEvent = AuditEvent
type BasicIncomeDistributeEvent ¶
type BasicIncomeDistributeEvent = AuditEvent
type BasicIncomeInitializer ¶
type BasicIncomeInitializer interface { // Creates context that processes basic income for provided epoch. CreateContext(epoch uint64) (*basic.IncomeSettlementContext, error) }
BasicIncomeInitializer is an interface of basic income context creator.
type Option ¶
type Option func(*options)
Option is a Processor constructor's option.
func WithLogger ¶
WithLogger returns option to override the component for logging.
type Prm ¶
type Prm struct { AuditProcessor AuditProcessor BasicIncome BasicIncomeInitializer State AlphabetState }
Prm groups the required parameters of Processor's constructor.
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
Processor is an event handler for payments in the system.
func (*Processor) HandleAuditEvent ¶
HandleAuditEvent catches a new AuditEvent and adds AuditProcessor call to the execution queue.