server

package
v0.0.0-...-eebd556 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Address for the server to listen on. The format is "host:port". Defaults
	// to ":9900".
	Address string
	// ReadTimeout is the maximum duration for reading the entire request,
	// including the body. Defaults to 5s.
	ReadTimeout time.Duration
	// WriteTimeout is the maximum duration before timing out writes of the
	// response. It is reset whenever a new request's header is read. Defaults
	// to 10s.
	WriteTimeout time.Duration
}

type Option

type Option func(*Server)

func WithLogger

func WithLogger(l loglib.Logger) Option

type Server

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

func New

func New(cfg *Config, store store.Store, opts ...Option) *Server

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) Start

func (s *Server) Start() error

Start will start the subscription server. This call is blocking.

Jump to

Keyboard shortcuts

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