server

package
v0.0.0-...-cf015e3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, path string) error

Run runs the application and launch servers

Types

type HTTPServer

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

func New

func New(ctx context.Context, cfg *config.Config) (*HTTPServer, error)

func NewHTTPServer

func NewHTTPServer(cfg *config.Config, processor *picfit.Processor) (*HTTPServer, error)

func (*HTTPServer) Init

func (s *HTTPServer) Init() error

func (*HTTPServer) Run

func (s *HTTPServer) Run(ctx context.Context) error

Run loads a new http server

func (*HTTPServer) ServeHTTP

func (s *HTTPServer) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Option

type Option func(*Options)

Option is a functional option.

func WithContext

func WithContext(ctx context.Context) Option

WithContext overrides context instance.

type Options

type Options struct {
	Context context.Context
}

Options are server options.

func NewOptions

func NewOptions(opts ...Option) Options

NewOptions initializes server options.

Jump to

Keyboard shortcuts

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