server

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Name         string
	HTTPAddr     string
	HTTPSAddr    string
	CertProvider *autocert.Provider
	Handler      http.Handler
}

type Server

type Server struct {
	Name         string
	CertProvider *autocert.Provider
	// contains filtered or unexported fields
}

func NewServer

func NewServer(opt Options) (s *Server)

func StartServer

func StartServer(parent task.Parent, opt Options) (s *Server)

func (*Server) Start

func (s *Server) Start(parent task.Parent)

Start will start the http and https servers.

If both are not set, this does nothing.

Start() is non-blocking.

func (*Server) Uptime

func (s *Server) Uptime() time.Duration

Jump to

Keyboard shortcuts

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