server

package
v0.0.60 Latest Latest
Warning

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

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

Documentation

Overview

Package server implements the Katzenpost voting authority server.

Index

Constants

This section is empty.

Variables

View Source
var (
	MixPublishDeadline       = epochtime.Period / 8
	AuthorityVoteDeadline    = MixPublishDeadline + epochtime.Period/8
	AuthorityRevealDeadline  = AuthorityVoteDeadline + epochtime.Period/8
	AuthorityCertDeadline    = AuthorityRevealDeadline + epochtime.Period/8
	PublishConsensusDeadline = AuthorityCertDeadline + epochtime.Period/8
)
View Source
var ErrGenerateOnly = errors.New("server: GenerateOnly set")

ErrGenerateOnly is the error returned when the server initialization terminates due to the `GenerateOnly` debug config option.

Functions

This section is empty.

Types

type PeerConnectionAttempt added in v0.0.58

type PeerConnectionAttempt struct {
	Timestamp     time.Time
	Success       bool
	Error         string
	Duration      time.Duration
	AddressUsed   string
	ErrorCategory string // "network", "handshake", "timeout", "auth", etc.
}

PeerConnectionAttempt represents a single connection attempt to a peer

type PeerSurveyData added in v0.0.58

type PeerSurveyData struct {
	PeerID              [publicKeyHashSize]byte
	PeerName            string
	IdentityPublicKey   sign.PublicKey
	LinkPublicKey       kem.PublicKey
	Addresses           []string
	ConnectionHistory   []PeerConnectionAttempt
	TotalAttempts       int
	SuccessfulAttempts  int
	ConsecutiveFailures int
	LastSuccessfulConn  *time.Time
	LastFailedConn      *time.Time
}

PeerSurveyData tracks historical connectivity information for a peer

type Server

type Server struct {
	sync.WaitGroup
	// contains filtered or unexported fields
}

Server is a voting authority server instance.

func New

func New(cfg *config.Config) (*Server, error)

New returns a new Server instance parameterized with the specific configuration.

func (*Server) IdentityKey

func (s *Server) IdentityKey() sign.PublicKey

IdentityKey returns the running Server's identity public key.

func (*Server) RotateLog

func (s *Server) RotateLog()

RotateLog rotates the log file if logging to a file is enabled.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown cleanly shuts down a given Server instance.

func (*Server) Wait

func (s *Server) Wait()

Wait waits till the server is terminated for any reason.

Directories

Path Synopsis
Package config implements the Katzenpost voting authority server configuration.
Package config implements the Katzenpost voting authority server configuration.

Jump to

Keyboard shortcuts

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