srv

package
v0.0.0-...-244c27e Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAlreadyExist = errors.New("already exist")
	ErrDoesNotExist = errors.New("does not exist")
	ErrInvalidAddr  = errors.New("invalid addr")
	ErrCertMissing  = errors.New("certificates missing")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Addr    string
	Handler http.Handler
	CrtFile string
	KeyFile string
}

type Srv

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

func New

func New(onListen onListen, onShutdown onShutdown) *Srv

func (*Srv) Add

func (s *Srv) Add(config Config) error

func (*Srv) Close

func (s *Srv) Close()

func (*Srv) Exist

func (s *Srv) Exist(addr string) bool

func (*Srv) Remove

func (s *Srv) Remove(addr string) error

Jump to

Keyboard shortcuts

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