server

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServAlreadyRunning = errors.New("server already running")
	ErrServAlreadyStopped = errors.New("server already stopped")
)

Functions

This section is empty.

Types

type CommandHandler

type CommandHandler func([]byte) ([]byte, error)

type Server

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

func New

func New(path string) *Server

func (*Server) AddCommand

func (v *Server) AddCommand(name string, handler CommandHandler)

func (*Server) Down

func (v *Server) Down() error

func (*Server) ErrorLog

func (v *Server) ErrorLog(handler func(err error))

func (*Server) Up

func (v *Server) Up() error

Jump to

Keyboard shortcuts

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