collector

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupCollector

func SetupCollector(cfg config.CollecterServiceConfig, chainIDToAddress map[string]string, waitTime time.Duration) error

Types

type CollectorI

type CollectorI interface {
	// SendToCollector sends screened-packet hash, signature and few other meta data required by the
	// db-service.
	SendToCollector(ctx context.Context, sp *chain.ScreenedPacket, pktHash, sig string) error
	// ReceivePktsFromCollector regularly polls db-service if there are any packets that attestors need to
	// resend signature. This feature in db-service will become handy especially when db-service is corrupted
	// and new db-service is started.
	// Note that, db-service will delete missed-packet entry from its collection only when attestor sends valid
	// signature.
	ReceivePktsFromCollector(ctx context.Context, ch chan<- *chain.MissedPacket)

	CheckCollectorHealth(ctx context.Context) error
}

CollectorI represents the interface for a signature collector i.e. db-service and hence the name collectorI.

func GetCollector

func GetCollector() CollectorI

Jump to

Keyboard shortcuts

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