app

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App[C any] interface {
	Name() string
	Setup(ab Builder, config C, logger log.Logger)
	Start(context.Context) error
	Stop()
}

type Builder

type Builder interface {
	AppName() string
	BuildApp(log.Logger) *baseapp.BaseApp
	RegisterJob(job.Basic)
	RegisterMetrics(cfg *telemetry.Config) error
	RegisterDB(db ethdb.KeyValueStore)
	RegisterHTTPHandler(handler *server.Handler) error
	RegisterMiddleware(m server.Middleware) error
	RegisterPrometheusTelemetry() error
}

Builder is a builder for an app. It follows a basic factory pattern.

Jump to

Keyboard shortcuts

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