app

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: GPL-3.0 Imports: 51 Imported by: 0

Documentation

Overview

Package app provides the top app-level abstraction and entrypoint for a charon DVC instance. The sub-packages also provide app-level functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, conf Config) (err error)

Run is the entrypoint for running a charon DVC instance. All processes and their dependencies are wired and added to the life cycle manager which handles starting and graceful shutdown.

Types

type Config

type Config struct {
	P2P              p2p.Config
	Log              log.Config
	Feature          featureset.Config
	LockFile         string
	DataDir          string
	MonitoringAddr   string
	ValidatorAPIAddr string
	BeaconNodeAddrs  []string
	JaegerAddr       string
	JaegerService    string
	SimnetBMock      bool
	SimnetVMock      bool
	BuilderAPI       bool

	TestConfig TestConfig
}

type TestConfig

type TestConfig struct {
	// Lock provides the lock explicitly, skips loading from disk.
	Lock *cluster.Lock
	// P2PKey provides the p2p privkey explicitly, skips loading from keystore on disk.
	P2PKey *ecdsa.PrivateKey
	// DisablePing disables the ping service.
	DisablePing bool
	// PingCallback is called when a ping was completed to a peer.
	PingCallback func(peer.ID)
	// ParSigExFunc provides an in-memory partial signature exchange.
	ParSigExFunc func() core.ParSigEx
	// LcastTransportFunc provides an in-memory leader cast transport.
	LcastTransportFunc func() leadercast.Transport
	// SimnetKeys provides private key shares for the simnet validatormock signer.
	SimnetKeys []*bls_sig.SecretKey
	// SimnetBMockOpts defines additional simnet beacon mock options.
	SimnetBMockOpts []beaconmock.Option
	// BroadcastCallback is called when a duty is completed and sent to the broadcast component.
	BroadcastCallback func(context.Context, core.Duty, core.PubKey, core.SignedData) error
	// DisablePromWrap disables wrapping prometheus metrics with cluster identifiers.
	DisablePromWrap bool
	// BuilderAPI enables the builder API opt-in feature
	BuilderAPI bool
}

TestConfig defines additional test-only config.

Directories

Path Synopsis
Package errors provides errors with structured fields and stack traces.
Package errors provides errors with structured fields and stack traces.
Package eth2wrap provides a wrapper for eth2http.Service adding prometheus metrics and error wrapping.
Package eth2wrap provides a wrapper for eth2http.Service adding prometheus metrics and error wrapping.
genwrap
Command genwrap provides a code generator for eth2client provider methods implemented by eth2multi.Service.
Command genwrap provides a code generator for eth2client provider methods implemented by eth2multi.Service.
Package featureset defines a set of global features and their rollout status.
Package featureset defines a set of global features and their rollout status.
Package lifecycle provides a life cycle manager abstracting the starting and stopping of processes by registered start or stop hooks.
Package lifecycle provides a life cycle manager abstracting the starting and stopping of processes by registered start or stop hooks.
Package log provides global logging functions to be used throughout the charon app.
Package log provides global logging functions to be used throughout the charon app.
Package retry provides a generic async function executor with retries for robustness against network failures.
Package retry provides a generic async function executor with retries for robustness against network failures.
Package tracer provides a global OpenTelemetry tracer.
Package tracer provides a global OpenTelemetry tracer.
z
Package z provides an API for structured logging fields by wrapping zap.Field.
Package z provides an API for structured logging fields by wrapping zap.Field.

Jump to

Keyboard shortcuts

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