Documentation ¶
Index ¶
- Constants
- Variables
- func IsCanceledError(err error) bool
- type BlockValidation
- type CrossValidator
- type CrossValidatorParams
- type CrossValidatorRequest
- type CrossValidatorResponse
- type EventLoader
- type EventLoaderParams
- type EventLoaderRequest
- type EventLoaderResponse
- type EventReader
- type EventReaderParams
- type EventReaderRequest
- type EventReaderResponse
- type EventReconciler
- type EventReconcilerParams
- type EventReconcilerRequest
- type EventReconcilerResponse
- type Extractor
- type ExtractorParams
- type ExtractorRequest
- type ExtractorResponse
- type Heartbeater
- type LivenessCheck
- type LivenessCheckParams
- type LivenessCheckRequest
- type LivenessCheckResponse
- type Loader
- type LoaderParams
- type LoaderRequest
- type LoaderResponse
- type Reader
- type ReaderParams
- type ReaderRequest
- type ReaderResponse
- type Replicator
- type ReplicatorParams
- type ReplicatorRequest
- type ReplicatorResponse
- type Streamer
- type StreamerMetrics
- type StreamerParams
- type StreamerRequest
- type StreamerResponse
- type Syncer
- type SyncerParams
- type SyncerRequest
- type SyncerResponse
- type UpdateWatermark
- type UpdateWatermarkParams
- type UpdateWatermarkRequest
- type UpdateWatermarkResponse
- type Validator
- type ValidatorParams
- type ValidatorRequest
- type ValidatorResponse
Constants ¶
View Source
const ( ActivityExtractor = "activity.extractor" ActivityLoader = "activity.loader" ActivitySyncer = "activity.syncer" ActivityLivenessCheck = "activity.liveness_check" ActivityReader = "activity.reader" ActivityValidator = "activity.validator" ActivityStreamer = "activity.streamer" ActivityCrossValidator = "activity.cross_validator" ActivityEventReader = "activity.event_reader" ActivityEventReconciler = "activity.event_reconciler" ActivityEventLoader = "activity.event_loader" ActivityReplicator = "activity.replicator" ActivityUpdateWatermark = "activity.update_watermark" )
Variables ¶
View Source
var (
ErrDownloadFailure = xerrors.New("download failure")
)
View Source
var Module = fx.Options( fx.Provide(NewHeartbeater), fx.Provide(NewExtractor), fx.Provide(NewLoader), fx.Provide(NewSyncer), fx.Provide(NewLivenessCheck), fx.Provide(NewReader), fx.Provide(NewValidator), fx.Provide(NewStreamer), fx.Provide(NewCrossValidator), fx.Provide(NewEventReader), fx.Provide(NewEventReconciler), fx.Provide(NewEventLoader), fx.Provide(NewReplicator), fx.Provide(NewUpdateWatermark), )
Functions ¶
func IsCanceledError ¶
Types ¶
type BlockValidation ¶
type BlockValidation struct { Height uint64 Metadata *api.BlockMetadata }
type CrossValidator ¶
type CrossValidator struct {
// contains filtered or unexported fields
}
func NewCrossValidator ¶
func NewCrossValidator(params CrossValidatorParams) *CrossValidator
func (*CrossValidator) Execute ¶
func (v *CrossValidator) Execute(ctx workflow.Context, request *CrossValidatorRequest) (*CrossValidatorResponse, error)
type CrossValidatorParams ¶
type CrossValidatorParams struct { fx.In fxparams.Params Runtime cadence.Runtime ValidatorClient client.Client `name:"validator"` MetaStorage metastorage.MetaStorage StorageClient blobstorage.BlobStorage Parser parser.Parser }
type CrossValidatorRequest ¶
type CrossValidatorResponse ¶
type EventLoader ¶
type EventLoader struct {
// contains filtered or unexported fields
}
func NewEventLoader ¶
func NewEventLoader(params EventLoaderParams) *EventLoader
func (*EventLoader) Execute ¶
func (a *EventLoader) Execute(ctx workflow.Context, request *EventLoaderRequest) (*EventLoaderResponse, error)
type EventLoaderParams ¶
type EventLoaderParams struct { fx.In Runtime cadence.Runtime MetaStorage metastorage.MetaStorage }
type EventLoaderRequest ¶
type EventLoaderRequest struct { EventTag uint32 `validate:"required"` Events []*model.EventEntry }
type EventLoaderResponse ¶
type EventLoaderResponse struct { }
type EventReader ¶
type EventReader struct {
// contains filtered or unexported fields
}
func NewEventReader ¶
func NewEventReader(params EventReaderParams) *EventReader
func (*EventReader) Execute ¶
func (a *EventReader) Execute(ctx workflow.Context, request *EventReaderRequest) (*EventReaderResponse, error)
type EventReaderParams ¶
type EventReaderParams struct { fx.In Runtime cadence.Runtime MetaStorage metastorage.MetaStorage }
type EventReaderRequest ¶
type EventReaderResponse ¶
type EventReaderResponse struct { // Eventdata is set to nil if event does not exist in meta storage Eventdata []*model.EventEntry }
type EventReconciler ¶
type EventReconciler struct {
// contains filtered or unexported fields
}
func NewEventReconciler ¶
func NewEventReconciler(params EventReconcilerParams) *EventReconciler
func (*EventReconciler) Execute ¶
func (a *EventReconciler) Execute(ctx workflow.Context, request *EventReconcilerRequest) (*EventReconcilerResponse, error)
type EventReconcilerParams ¶
type EventReconcilerParams struct { fx.In Runtime cadence.Runtime MetaStorage metastorage.MetaStorage }
type EventReconcilerRequest ¶
type EventReconcilerRequest struct { Tag uint32 `validate:"required"` EventTag uint32 `validate:"required"` UpgradeFromEventTag uint32 UpgradeFromEvents []*model.EventEntry }
type EventReconcilerResponse ¶
type EventReconcilerResponse struct {
Eventdata []*model.EventEntry
}
type Extractor ¶
type Extractor struct {
// contains filtered or unexported fields
}
func NewExtractor ¶
func NewExtractor(params ExtractorParams) *Extractor
func (*Extractor) Execute ¶
func (a *Extractor) Execute(ctx workflow.Context, request *ExtractorRequest) (*ExtractorResponse, error)
type ExtractorParams ¶
type ExtractorParams struct { fx.In Runtime cadence.Runtime BlockchainClient client.Client `name:"slave"` BlobStorage blobstorage.BlobStorage MetaStorage metastorage.MetaStorage FailoverManager endpoints.FailoverManager }
type ExtractorRequest ¶
type ExtractorResponse ¶
type ExtractorResponse struct {
Metadatas []*api.BlockMetadata
}
type Heartbeater ¶
func NewHeartbeater ¶
func NewHeartbeater() Heartbeater
func NewNopHeartbeater ¶
func NewNopHeartbeater() Heartbeater
type LivenessCheck ¶
type LivenessCheck struct {
// contains filtered or unexported fields
}
func NewLivenessCheck ¶
func NewLivenessCheck(params LivenessCheckParams) *LivenessCheck
func (*LivenessCheck) Execute ¶
func (a *LivenessCheck) Execute(ctx workflow.Context, request *LivenessCheckRequest) (*LivenessCheckResponse, error)
type LivenessCheckParams ¶
type LivenessCheckRequest ¶
type LivenessCheckResponse ¶
type LivenessCheckResponse struct {
LivenessCheckViolation bool
}
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
func NewLoader ¶
func NewLoader(params LoaderParams) *Loader
func (*Loader) Execute ¶
func (a *Loader) Execute(ctx workflow.Context, request *LoaderRequest) (*LoaderResponse, error)
type LoaderParams ¶
type LoaderParams struct { fx.In Runtime cadence.Runtime MetaStorage metastorage.MetaStorage }
type LoaderRequest ¶
type LoaderRequest struct { Metadata []*api.BlockMetadata `validate:"required"` LastBlock *api.BlockMetadata UpdateWatermark bool }
type LoaderResponse ¶
type LoaderResponse struct { }
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func NewReader ¶
func NewReader(params ReaderParams) *Reader
func (*Reader) Execute ¶
func (a *Reader) Execute(ctx workflow.Context, request *ReaderRequest) (*ReaderResponse, error)
type ReaderParams ¶
type ReaderParams struct { fx.In Runtime cadence.Runtime MetaStorage metastorage.MetaStorage }
type ReaderRequest ¶
type ReaderResponse ¶
type ReaderResponse struct { // Metadata is set to nil if the block does not exist in meta storage. Metadata *api.BlockMetadata }
type Replicator ¶
type Replicator struct {
// contains filtered or unexported fields
}
func NewReplicator ¶
func NewReplicator(params ReplicatorParams) *Replicator
func (*Replicator) Execute ¶
func (a *Replicator) Execute(ctx workflow.Context, request *ReplicatorRequest) (*ReplicatorResponse, error)
type ReplicatorParams ¶
type ReplicatorParams struct { fx.In fxparams.Params Runtime cadence.Runtime Client gateway.Client BlockDownloader downloader.BlockDownloader MetaStorage metastorage.MetaStorage BlobStorage blobstorage.BlobStorage }
type ReplicatorRequest ¶
type ReplicatorResponse ¶
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
func NewStreamer ¶
func NewStreamer(params StreamerParams) *Streamer
func (*Streamer) Execute ¶
func (s *Streamer) Execute(ctx workflow.Context, request *StreamerRequest) (*StreamerResponse, error)
type StreamerMetrics ¶
type StreamerMetrics struct {
// contains filtered or unexported fields
}
type StreamerParams ¶
type StreamerParams struct { fx.In fxparams.Params Runtime cadence.Runtime MetaStorage metastorage.MetaStorage }
type StreamerRequest ¶
type StreamerResponse ¶
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
func NewSyncer ¶
func NewSyncer(params SyncerParams) *Syncer
func (*Syncer) Execute ¶
func (a *Syncer) Execute(ctx workflow.Context, request *SyncerRequest) (*SyncerResponse, error)
type SyncerParams ¶
type SyncerParams struct { fx.In fxparams.Params Runtime cadence.Runtime Heartbeater Heartbeater MetaStorage metastorage.MetaStorage BlobStorage blobstorage.BlobStorage BlockchainClient client.ClientParams FailoverManager endpoints.FailoverManager }
type SyncerRequest ¶
type SyncerRequest struct { Tag uint32 `validate:"required"` MinStartHeight uint64 MaxBlocksToSync uint64 `validate:"required"` Parallelism int `validate:"required"` DataCompression api.Compression Failover bool // Failover will switch master/slave to failover clusters. ConsensusFailover bool // ConsensusFailover will switch consensus client to failover clusters. FastSync bool // FastSync should be enabled if the chain has no reorg. IrreversibleDistance uint64 // A reorg will be rejected if it exceeds this distance. NumBlocksToSkip uint64 // Skip the last N blocks to work around syncing delays in the nodes. TransactionsWriteParallelism int // Parallelism set to the concurrency of adding/updating transactions table, it is also the feature flag to enable transaction processing if value > 0. ConsensusValidation bool // ConsensusValidation is a feature flag to enable consensus layer validation. ConsensusValidationMuted bool // ConsensusValidationMuted is a feature flag to mute consensus layer validation failures. }
type SyncerResponse ¶
type UpdateWatermark ¶
type UpdateWatermark struct {
// contains filtered or unexported fields
}
func NewUpdateWatermark ¶
func NewUpdateWatermark(params UpdateWatermarkParams) *UpdateWatermark
func (*UpdateWatermark) Execute ¶
func (a *UpdateWatermark) Execute(ctx workflow.Context, request *UpdateWatermarkRequest) (*UpdateWatermarkResponse, error)
type UpdateWatermarkParams ¶
type UpdateWatermarkParams struct { fx.In fxparams.Params Runtime cadence.Runtime MetaStorage metastorage.MetaStorage }
type UpdateWatermarkRequest ¶
type UpdateWatermarkResponse ¶
type UpdateWatermarkResponse struct {
BlockHeight uint64
}
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator(params ValidatorParams) *Validator
func (*Validator) Execute ¶
func (v *Validator) Execute(ctx workflow.Context, request *ValidatorRequest) (*ValidatorResponse, error)
type ValidatorParams ¶
type ValidatorParams struct { fx.In fxparams.Params Runtime cadence.Runtime MetaStorage metastorage.MetaStorage Client client.ClientParams Parser parser.Parser StorageClient blobstorage.BlobStorage FailoverManager endpoints.FailoverManager }
type ValidatorRequest ¶
type ValidatorRequest struct { Tag uint32 `validate:"required"` StartHeight uint64 ValidationHeightPadding uint64 `validate:"required"` MaxHeightsToValidate uint64 `validate:"required"` StartEventId int64 MaxEventsToValidate uint64 `validate:"required"` Parallelism int `validate:"required,gt=0"` EventTag uint32 Failover bool }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.