api

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: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFromConfig

func InitFromConfig(ctx context.Context, api *API, cfg *Config) (err error)

Types

type API

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

func (*API) Close

func (api *API) Close(ctx context.Context)

func (*API) InitFromCli

func (api *API) InitFromCli(ctx context.Context, c *cli.Context) error

func (*API) Name

func (api *API) Name() string

func (*API) Start

func (api *API) Start() error

nolint: funlen

type Config

type Config struct {
	// db configs
	DatabaseUsername        string
	DatabasePassword        string
	DatabaseName            string
	DatabaseHost            string
	DatabaseMaxIdleConns    uint64
	DatabaseMaxOpenConns    uint64
	DatabaseMaxConnLifetime uint64
	CORSOrigins             []string
	// rpc configs
	SrcRPCUrl               string
	DestRPCUrl              string
	ProcessingFeeMultiplier float64
	DestTaikoAddress        common.Address
	HTTPPort                uint64
	OpenDBFunc              func() (db.DB, error)
}

func NewConfigFromCliContext

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

NewConfigFromCliContext creates a new config instance from command line flags.

Jump to

Keyboard shortcuts

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