config

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config provides common configuration structures and utilities shared between courier and replica services.

Index

Constants

View Source
const (
	// DefaultLogLevel is the default logging level
	DefaultLogLevel = "NOTICE"

	// Common timeout defaults (in milliseconds)
	DefaultConnectTimeout   = 60 * 1000  // 60 sec.
	DefaultHandshakeTimeout = 30 * 1000  // 30 sec.
	DefaultReauthInterval   = 300 * 1000 // 300 sec.
)

Variables

This section is empty.

Functions

func LoadConfigFromBytes

func LoadConfigFromBytes(b []byte, cfg interface{}) error

LoadConfigFromBytes parses and validates the provided buffer as a TOML config

func LoadConfigFromFile

func LoadConfigFromFile(filename string, cfg interface{}) error

LoadConfigFromFile loads and parses the provided file as a TOML config

Types

type Logging

type Logging struct {
	// Disable disables logging entirely.
	Disable bool

	// File specifies the log file, if omitted stdout will be used.
	File string

	// Level specifies the log level.
	Level string
}

Logging is the Katzenpost server logging configuration.

func DefaultLogging

func DefaultLogging() Logging

DefaultLogging returns the default logging configuration

func (*Logging) Validate

func (lCfg *Logging) Validate() error

Validate validates the logging configuration

type PKI

type PKI struct {
	Voting *Voting
}

PKI is the Katzenpost directory authority configuration.

func (*PKI) Validate

func (pCfg *PKI) Validate(datadir string) error

Validate validates the PKI configuration

type Voting

type Voting struct {
	Authorities []*config.Authority
}

Voting is a set of Authorities that vote on a threshold consensus PKI

func (*Voting) Validate

func (vCfg *Voting) Validate(datadir string) error

Validate validates the Voting configuration

Jump to

Keyboard shortcuts

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