server

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 13 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 *ssh.Server
	Config    *config.Config
	// contains filtered or unexported fields
}

Server is the Soft Serve server.

func NewServer

func NewServer(cfg *config.Config) *Server

NewServer returns a new *ssh.Server configured to serve Soft Serve. The SSH server key-pair will be created if none exists. An initial admin SSH public key can be provided with authKey. If authKey is provided, access will be restricted to that key. If authKey is not provided, the server will be publicly writable until configured otherwise by cloning the `config` repo.

func (*Server) Close added in v0.3.0

func (srv *Server) Close() error

Close closes the SSH server.

func (*Server) Reload

func (srv *Server) Reload() error

Reload reloads the server configuration.

func (*Server) Shutdown added in v0.1.3

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

Shutdown lets the server gracefully shutdown.

func (*Server) Start

func (srv *Server) Start() error

Start starts the SSH server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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