website

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

Option sets various options for NewServer().

func WithQuiet

func WithQuiet() Option

WithQuiet silences default logging output.

func WithSocketPerm

func WithSocketPerm(perm os.FileMode) Option

WithSocketPerm sets the file-mode permissions applied to file-backed UNIX domain sockets after binding. It has no effect on TCP/IP or abstract namespace sockets.

func WithTLS

func WithTLS(cs *utils.CertStorage) Option

WithTLS sets TLS credentials.

type Server

type Server struct {
	CertStorage *utils.CertStorage
	// contains filtered or unexported fields
}

Server is the static website hosting endpoint.

func NewServer

func NewServer(be backend.Backend, domain string, opts ...Option) *Server

NewServer creates a new static website hosting server. The domain parameter is the base domain for virtual-host routing:

  • Host "blog.<domain>" resolves to bucket "blog"
  • Host "<domain>" (apex, no subdomain) resolves to bucket "<domain>"

func (*Server) ServeMultiPort

func (s *Server) ServeMultiPort(ports []string) error

ServeMultiPort creates listeners for multiple address specifications and serves on all of them simultaneously.

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown gracefully shuts down the server.

Jump to

Keyboard shortcuts

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