service

package
v0.0.0-...-2143b8a Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyStopped = errors.New("already stopped")

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(metrics m.Metricer, logger log.Logger, archiver *Archiver) *API

NewAPI creates a new Archiver API instance. This API exposes an admin interface to control the archiver.

type Archiver

type Archiver struct {
	// contains filtered or unexported fields
}

func NewArchiver

func NewArchiver(l log.Logger, cfg flags.ArchiverConfig, dataStoreClient storage.DataStore, client BeaconClient, m metrics.Metricer) (*Archiver, error)

func (*Archiver) Start

func (a *Archiver) Start(ctx context.Context) error

Start starts archiving blobs. It begins polling the beacon node for the latest blocks and persisting blobs for them. Concurrently it'll also begin a backfill process (see backfillBlobs) to store all blobs from the current head to the previously stored blocks. This ensures that during restarts or outages of an archiver, any gaps will be filled in.

func (*Archiver) Stop

func (a *Archiver) Stop(ctx context.Context) error

Stops the archiver service.

type ArchiverService

type ArchiverService struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(l log.Logger, cfg flags.ArchiverConfig, api *API, archiver *Archiver, m metrics.Metricer) (*ArchiverService, error)

func (*ArchiverService) Start

func (a *ArchiverService) Start(ctx context.Context) error

Start starts the archiver service. It'll start the API's as well as the archiving process.

func (*ArchiverService) Stop

func (a *ArchiverService) Stop(ctx context.Context) error

Stops the archiver service.

func (*ArchiverService) Stopped

func (a *ArchiverService) Stopped() bool

Jump to

Keyboard shortcuts

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