server

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Server TLS configuration
	CertFile string
	KeyFile  string
	CAFile   string
	CAKey    string

	// Token configuration
	TokenExpiration time.Duration
	TokenSecret     string

	// Server configuration
	Address        string
	ReadTimeout    time.Duration
	WriteTimeout   time.Duration
	MaxHeaderBytes int

	// Rate limiting
	RateLimit float64 // Requests per second
	RateBurst int     // Maximum burst size
}

Config represents the server configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a default server configuration

func (*Config) LoadTLSConfig

func (c *Config) LoadTLSConfig() (*tls.Config, error)

LoadTLSConfig creates a TLS configuration from the server config

func (*Config) Mount

func (c *Config) Mount() error

func (*Config) Unmount

func (c *Config) Unmount() error

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration is valid

Jump to

Keyboard shortcuts

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