cmd

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BoltBlockStoreFileName = "blocks.db"
)

Variables

View Source
var (
	Opts = &allOptions{}
)

Functions

func New

func New(obsF Factory, opts ...interface{}) *alphabillApp

New creates a new Alphabill application

func NewKeysConf

func NewKeysConf(conf *baseConfiguration, relativeDir string) *keysConfig

Types

type Factory added in v0.3.0

type Factory interface {
	Logger(cfg *logger.LogConfiguration) (*slog.Logger, error)
	Observability(metrics, traces string) (observability.MeterAndTracer, error)
}

type Keys

type Keys struct {
	SigningPrivateKey    abcrypto.Signer
	EncryptionPrivateKey crypto.PrivKey
}

func GenerateKeys

func GenerateKeys() (*Keys, error)

GenerateKeys generates a new signing and encryption key.

func LoadKeys

func LoadKeys(file string, generateNewIfNotExist bool, overwrite bool) (*Keys, error)

LoadKeys loads signing and encryption keys.

func (*Keys) WriteTo

func (k *Keys) WriteTo(file string) error

type LoggerFactory added in v0.3.0

type LoggerFactory func(cfg *logger.LogConfiguration) (*slog.Logger, error)

type Observability added in v0.3.0

type Observability interface {
	Tracer(name string, options ...trace.TracerOption) trace.Tracer
	TracerProvider() trace.TracerProvider
	Meter(name string, opts ...metric.MeterOption) metric.Meter
	PrometheusRegisterer() prometheus.Registerer
	Shutdown() error
	Logger() *slog.Logger
}

type Option

type Option func(*Options)

type Options

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

Jump to

Keyboard shortcuts

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