server

package
v0.0.1-beta.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

README

Server

Code which runs the server.

Documentation

Overview

Package server - Main subsystem wrangler

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Dir   string
	Debug bool

	/* Listen addresses. */
	HTTPAddr  string
	HTTPSAddr string

	/* TLS Config.  If HTTPSAddr is set and there's no domains set, no
	Let's Encrypt provisioning will take place and a self-signed cert
	will be used for all HTTP requests. */
	LEDomainWhitelist []string
	SSDomainWhitelist []string
	LEStaging         bool
	LEEmail           string

	/* Other config. */
	ExfilMax uint64

	/* Only for testing. */
	TestLogOutput io.Writer
	// contains filtered or unexported fields
}

Server implements the server side of Plonk. Before starting, its public fields should be populated. Start should be used to start it and then Wait to wait for something bad to happen. Once Start is called, Server's fields should be treated as read-only.

func (*Server) CloseLogfile

func (s *Server) CloseLogfile() error

CloseLogfile closes the logfile. This is used during testing.

func (*Server) SL

func (s *Server) SL() *slog.Logger

SL returns s's logger.

func (*Server) Start

func (s *Server) Start() error

Start starts the server.

func (*Server) Stop

func (s *Server) Stop(defErr error) error

Stop stops the server. It returns the same value as wait. If no other error is to be returned, defErr is returned by both Wait and Stop.

func (*Server) Wait

func (s *Server) Wait() error

Wait waits for a fatal error or nil on clean shutdown with Stop.

Directories

Path Synopsis
Package implantsvr - Listen for and handle implant requests
Package implantsvr - Listen for and handle implant requests
Package operatorsvr - Listen for and handle operator connections
Package operatorsvr - Listen for and handle operator connections
Package perms - Process wide process permissions and such
Package perms - Process wide process permissions and such
Package state - Persistent state
Package state - Persistent state

Jump to

Keyboard shortcuts

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