runtime

package
v0.1.1-experimental.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppOptions

type AppOptions interface {
	Get(string) interface{}
}

AppOptions is an interface that provides the ability to retrieve options from the application.

type BeaconKitRuntime

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

BeaconKitRuntime is a struct that holds the service registry.

func NewBeaconKitRuntime

func NewBeaconKitRuntime(
	opts ...Option,
) (*BeaconKitRuntime, error)

NewBeaconKitRuntime creates a new BeaconKitRuntime and applies the provided options.

func NewDefaultBeaconKitRuntime

func NewDefaultBeaconKitRuntime(
	cfg *config.Config,
	signer core.BLSSigner,
	jwtSecret *jwt.Secret,
	kzgTrustedSetup *gokzg4844.JSONTrustedSetup,
	bsb BeaconStorageBackend,
	logger log.Logger,
) (*BeaconKitRuntime, error)

NewDefaultBeaconKitRuntime creates a new BeaconKitRuntime with the default services.

func (*BeaconKitRuntime) BuildABCIComponents

BuildABCIComponents returns the ABCI components for the beacon runtime.

func (*BeaconKitRuntime) StartServices

func (r *BeaconKitRuntime) StartServices(
	ctx context.Context,
)

StartServices starts the services.

type BeaconStorageBackend

type BeaconStorageBackend interface {
	AvailabilityStore(ctx context.Context) core.AvailabilityStore
	BeaconState(ctx context.Context) state.BeaconState
}

BeaconStorageBackend is an interface that provides the beacon state to the runtime.

type Option

type Option func(*BeaconKitRuntime) error

Option is a function that modifies the BeaconKitRuntime.

func WithBeaconStorageBackend

func WithBeaconStorageBackend(fscp BeaconStorageBackend) Option

WithBeaconStorageBackend sets the BeaconStorageBackend of the BeaconKitRuntime.

func WithConfig

func WithConfig(cfg *config.Config) Option

WithConfig sets the configuration of the BeaconKitRuntime.

func WithLogger

func WithLogger(logger log.Logger) Option

WithLogger sets the logger of the BeaconKitRuntime.

func WithServiceRegistry

func WithServiceRegistry(reg *service.Registry) Option

WithServiceRegistry sets the service registry of the BeaconKitRuntime.

type Service

type Service interface {
	// Start spawns any goroutines required by the service.
	Start(ctx context.Context)
	// Status returns error if the service is not considered healthy.
	Status() error
}

Service is a struct that can be registered into a ServiceRegistry for easy dependency management.

Directories

Path Synopsis
services

Jump to

Keyboard shortcuts

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