healthchecker

package
v0.3.1-0...-684a909 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFromConfig

func InitFromConfig(ctx context.Context, h *HealthChecker, cfg *Config) (err error)

Types

type Config

type Config struct {
	// db configs
	DatabaseUsername              string
	DatabasePassword              string
	DatabaseName                  string
	DatabaseHost                  string
	DatabaseMaxIdleConns          uint64
	DatabaseMaxOpenConns          uint64
	DatabaseMaxConnLifetime       uint64
	CORSOrigins                   []string
	Backoff                       uint64
	HTTPPort                      uint64
	GuardianProverContractAddress string
	L1RPCUrl                      string
	L2RPCUrl                      string
	OpenDBFunc                    func() (db.DB, error)
}

func NewConfigFromCliContext

func NewConfigFromCliContext(c *cli.Context) (*Config, error)

NewConfigFromCliContext creates a new config instance from command line flags.

type HealthChecker

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

func (*HealthChecker) Close

func (h *HealthChecker) Close(ctx context.Context)

func (*HealthChecker) InitFromCli

func (h *HealthChecker) InitFromCli(ctx context.Context, c *cli.Context) error

func (*HealthChecker) Name

func (h *HealthChecker) Name() string

func (*HealthChecker) Start

func (h *HealthChecker) Start() error

Jump to

Keyboard shortcuts

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