types

package
v0.0.0-...-50bfe8b Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfigFilePath = "config.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositeLogger

type CompositeLogger interface {
	cmtlog.Logger
	ethlog.Logger
}

CompositeLogger is the interface for a logger that implements both the cmtlog.Logger and ethlog.Logger interfaces

func NewCompositeLogger

func NewCompositeLogger(lvl string, keyvals ...any) (CompositeLogger, error)

NewCompositeLogger creates a new CompositeLogger Accepted log levels are: "trace", "debug", "info", "warn", "error", "crit"

type Config

type Config struct {
	// Accepted log levels are: "trace", "debug", "info", "warn", "error", "crit"
	LogLevel string `json:"logLevel"`

	GethEngineAddr string `json:"gethEngineAddr"`
	GethAuthSecret []byte `json:"gethAuthSecret"`

	EngineServerAddr  string `json:"engineServerAddr"`
	PeptideEngineAddr string `json:"peptideEngineAddr"`
}

Config is the configuration for the interceptor binary.

func ConfigFromFilePath

func ConfigFromFilePath(filePath string) (*Config, error)

ConfigFromFilePath reads a Config from a file.

func (*Config) GetLogger

func (c *Config) GetLogger(keyvals ...any) (CompositeLogger, error)

GetLogger returns a logger with the log level specified in the config and the given keyvals.

Jump to

Keyboard shortcuts

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