server

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Dir       string        `help:"output directory (defaults to tmp)"`
	Overwrite bool          `help:"duplicates are overwritten (auto-renames files by default)"`
	Auth      string        `help:"require basic auth 'username:password' on http connections"`
	Port      int           `help:"tcp listening port"`
	UDPPort   int           `help:"udp listening port (default disabled)"`
	UDPClose  time.Duration `help:"close udp file after timeout"`
	NoLog     bool          `help:"disable http request logging"`
	AllowedIP []string      `opts:"short=i, help=allowed ip range"`
	Verbose   bool          `help:"enable verbose logging"`
}

type Server

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

func New

func New(c Config) *Server

func (*Server) Start

func (s *Server) Start() error

Jump to

Keyboard shortcuts

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