server

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	SSHServer   *sshsrv.SSHServer
	GitDaemon   *daemon.GitDaemon
	HTTPServer  *web.HTTPServer
	StatsServer *stats.StatsServer
	Cron        *cron.Scheduler
	Config      *config.Config
	Backend     *backend.Backend
	DB          *db.DB
	// contains filtered or unexported fields
}

Server is the Soft Serve server.

func NewServer

func NewServer(ctx context.Context) (*Server, error)

NewServer returns a new *Server configured to serve Soft Serve. The SSH server key-pair will be created if none exists. It expects a context with *backend.Backend, *db.DB, *log.Logger, and *config.Config attached.

func (*Server) Close added in v0.3.0

func (s *Server) Close() error

Close closes the SSH server.

func (*Server) Shutdown added in v0.1.3

func (s *Server) Shutdown(ctx context.Context) error

Shutdown lets the server gracefully shutdown.

func (*Server) Start

func (s *Server) Start() error

Start starts the SSH server.

Jump to

Keyboard shortcuts

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