server

package
v0.0.0-...-9518a5e Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package server provides an HTTP server comprised of multiple HTTP services

Index

Constants

This section is empty.

Variables

Providers is our wire superset of providers this package offers.

Functions

This section is empty.

Types

type Config

type Config struct {
	StartupDeadline time.Duration `json:"startup_deadline" mapstructure:"startup_deadline" toml:"startup_deadline,omitempty"`
	HTTPPort        uint16        `json:"http_port" mapstructure:"http_port" toml:"http_port,omitempty"`
	Debug           bool          `json:"debug" mapstructure:"debug" toml:"debug,omitempty"`
	// contains filtered or unexported fields
}

Config describes the settings pertinent to the HTTP serving portion of the service.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates a Config struct.

type HTTPServer

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

HTTPServer is our API http server.

func ProvideHTTPServer

func ProvideHTTPServer(
	ctx context.Context,
	serverSettings Config,
	metricsHandler metrics.InstrumentationHandler,
	authService types.AuthService,
	usersService types.UserDataService,
	accountsService types.AccountDataService,
	apiClientsService types.APIClientDataService,
	websocketsService types.WebsocketDataService,
	itemsService types.ItemDataService,
	webhooksService types.WebhookDataService,
	adminService types.AdminService,
	frontendService frontend.Service,
	logger logging.Logger,
	encoder encoding.ServerEncoderDecoder,
	router routing.Router,
) (*HTTPServer, error)

ProvideHTTPServer builds a new HTTPServer instance.

func (*HTTPServer) Serve

func (s *HTTPServer) Serve()

Serve serves HTTP traffic.

Jump to

Keyboard shortcuts

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