event

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package event contains events/interfaces for raw and processsed block-replica objects

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockReplicaEvent

type BlockReplicaEvent struct {
	Hash string           `json:"hash"`
	Data *ty.BlockReplica `json:"data"`
}

BlockReplicaEvent is a replication event coming from a redis stream

func (*BlockReplicaEvent) GetBlockReplicaHash

func (o *BlockReplicaEvent) GetBlockReplicaHash() string

GetBlockReplicaHash gets the block-replica hash

func (*BlockReplicaEvent) GetBlockReplicaString

func (o *BlockReplicaEvent) GetBlockReplicaString() string

GetBlockReplicaString gets the block-replica string

func (*BlockReplicaEvent) Type added in v1.1.6

func (o *BlockReplicaEvent) Type() string

Type gets the block-replica event types - block-specimen, block-result, or combined(block-replica)

type Event

type Event interface {
	GetBlockReplicaHash() string
	GetBlockReplicaString() string
}

Event allows for accessing the hash of block-replica event object

func NewBlockReplicaEvent

func NewBlockReplicaEvent() (Event, error)

NewBlockReplicaEvent creates a new block-replica event

type ReplicaSegmentWrapped added in v1.1.6

type ReplicaSegmentWrapped struct {
	ReplicationSegment
	IDBatch     []string
	SegmentName string
}

ReplicaSegmentWrapped wraps a ReplicationSegment with additional information

type ReplicationSegment

type ReplicationSegment struct {
	BlockReplicaEvent []*BlockReplicaEvent `json:"replicaEvent"`
	StartBlock        uint64               `json:"startBlock"`
	EndBlock          uint64               `json:"endBlock"`
	Elements          uint64               `json:"elements"`
}

ReplicationSegment is block replication segment that is converted to AVRO encoding

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL