server

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MetricsAddr string `yaml:"metricsAddr" default:":9090"`
	// HealthCheckAddr is the address to listen on for healthcheck.
	HealthCheckAddr *string `yaml:"healthCheckAddr"`
	// PProfAddr is the address to listen on for pprof.
	PProfAddr *string `yaml:"pprofAddr"`
	// APIAddr is the address to listen on for the API server.
	APIAddr *string `yaml:"apiAddr"`
	// LoggingLevel is the logging level to use.
	LoggingLevel string `yaml:"logging" default:"info"`
	// Ethereum is the ethereum network configuration.
	Ethereum ethereum.Config `yaml:"ethereum"`
	// Redis is the redis configuration.
	Redis *redis.Config `yaml:"redis"`
	// StateManager is the state manager configuration.
	StateManager state.Config `yaml:"stateManager"`
	// Processors is the processor configuration.
	Processors processor.Config `yaml:"processors"`
	// ShutdownTimeout is the timeout for shutting down the server.
	ShutdownTimeout time.Duration `yaml:"shutdownTimeout" default:"10s"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Server

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

func NewServer

func NewServer(ctx context.Context, log logrus.FieldLogger, namespace string, config *Config) (*Server, error)

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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