server

package
v0.0.0-...-1618023 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CompileTime is when this was compiled
	CompileTime string
	// CompileRev is the git revision hash (sha1)
	CompileRev string
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// Debug, if true will enable verbose logging and will overwrite the flag passed into the server
	Debug          bool                        `yaml:"debug"`
	WebServer      web.Config                  `yaml:"web_server"`
	RPC            rpc.Config                  `yaml:"rpc_server"`
	Database       storage.Config              `yaml:"database"`
	FileManager    filemanager.Config          `yaml:"file_manager"`
	Authentication authentication.AuthSettings `yaml:"authentication"`
	Notification   notifications.Config        `yaml:"notifications"`
}

Config describes all the configuration values of the GoCrack server

type Server

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

Server is a GoCrack server instance

func New

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

New returns a gocrack server context. It creates the necessary listeners and opens a connection to the storage and authentication backend

func (*Server) Refresh

func (s *Server) Refresh() error

Refresh is called on a SIGUSR1 and refreshes the internal server state

func (*Server) Start

func (s *Server) Start() error

Start spawns the API Server as well as the RPC Server and blocks until stop has been called

func (*Server) Stop

func (s *Server) Stop() error

Stop gracefully stops the GoCrack server and waits for all the goroutines to exit

Directories

Path Synopsis
rpc
bdb

Jump to

Keyboard shortcuts

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