server

package module
v0.0.0-...-ce289cb Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDatabaseMiddleware

func CreateDatabaseMiddleware(name string) (bool, func() error)

Types

type Config

type Config struct {
	DatabasePath       string `env:"DATABASE_PATH" envDefault:"/var/lib/infinitedb/"`
	Authentication     bool   `env:"AUTHENTICATION" envDefault:"true"`
	Port               uint   `env:"PORT" envDefault:"8080"`
	RequestLogging     bool   `env:"REQUEST_LOGGING" envDefault:"false"`
	CacheSize          uint   `env:"CACHE_SIZE" envDefault:"1000"`
	TLS                bool   `env:"TLS" envDefault:"false"`
	TLSCert            string `env:"TLS_CERT"`
	TLSKey             string `env:"TLS_KEY"`
	WebsocketReadLimit int64  `env:"WEBSOCKET_READ_LIMIT" envDefault:"10000000"`
	UnixSocketPath     string `env:"UNIX_SOCKET_PATH" envDefault:"/tmp/infinitedb.sock"`
}

func LoadConfig

func LoadConfig() (*Config, error)

type Server

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

func New

func New(
	logger util.Logger,
	idbLogger util.Logger,
	shutdown func(),
) (*Server, error)

func (*Server) Kill

func (s *Server) Kill()

func (*Server) Run

func (s *Server) Run() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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