container

package
v0.23.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIVersion1         = "1.0"
	APINamespaceObscuro = "obscuro"
	APINamespaceEth     = "eth"
	APINamespaceTenScan = "tenscan"
	APINamespaceScan    = "scan"
	APINamespaceNetwork = "net"
	APINamespaceTest    = "test"
	APINamespaceDebug   = "debug"
)

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig() (*config.HostInputConfig, error)

ParseConfig returns a config.HostInputConfig based on either the file identified by the `config` flag, or the flags with specific defaults (if the `config` flag isn't specified).

Types

type HostConfigToml

type HostConfigToml struct {
	IsGenesis                 bool
	NodeType                  string
	HasClientRPCHTTP          bool
	ClientRPCPortHTTP         uint
	HasClientRPCWebsockets    bool
	ClientRPCPortWS           uint
	ClientRPCHost             string
	EnclaveRPCAddress         string
	P2PBindAddress            string
	P2PPublicAddress          string
	L1WebsocketURL            string
	EnclaveRPCTimeout         int
	L1RPCTimeout              int
	P2PConnectionTimeout      int
	ManagementContractAddress string
	MessageBusAddress         string
	LogLevel                  int
	LogPath                   string
	PrivateKeyString          string
	L1ChainID                 int64
	ObscuroChainID            int64
	ProfilerEnabled           bool
	L1StartHash               string
	SequencerID               string
	MetricsEnabled            bool
	MetricsHTTPPort           uint
	UseInMemoryDB             bool
	LevelDBPath               string
	DebugNamespaceEnabled     bool
	BatchInterval             string
	MaxBatchInterval          string
	RollupInterval            string
	IsInboundP2PDisabled      bool
	L1BlockTime               int
	MaxRollupSize             int
}

HostConfigToml is the structure that a host's .toml config is parsed into.

type HostContainer

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

func NewHostContainer

func NewHostContainer(cfg *config.HostConfig, services *host.ServicesRegistry, p2p hostcommon.P2PHostService, l1Client ethadapter.EthClient, l1Repo hostcommon.L1RepoService, enclaveClient common.Enclave, contractLib mgmtcontractlib.MgmtContractLib, hostWallet wallet.Wallet, rpcServer clientrpc.Server, logger gethlog.Logger, metricsService *metrics.Service) *HostContainer

NewHostContainer builds a host container with dependency injection rather than from config. Useful for testing etc. (want to be able to pass in logger, and also have option to mock out dependencies)

func NewHostContainerFromConfig

func NewHostContainerFromConfig(parsedConfig *config.HostInputConfig, logger gethlog.Logger) *HostContainer

NewHostContainerFromConfig uses config to create all HostContainer dependencies and inject them into a new HostContainer (Note: it does not start the HostContainer process, `Start()` must be called on the container)

func (*HostContainer) Host

func (h *HostContainer) Host() hostcommon.Host

func (*HostContainer) Start

func (h *HostContainer) Start() error

func (*HostContainer) Stop

func (h *HostContainer) Stop() error

Jump to

Keyboard shortcuts

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