server

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(
	NewApp,
	NewOptions,
	providerSet,
)

Functions

func CreateInitControllersFn

func CreateInitControllersFn(
	accountsInit accounts.InitAccountGroupFn,
	judgementsInit judgements.InitJudgementGroupFn,
	submissionsInit submissions.InitSubmissionGroupFn,
	problemsInit problems.InitProblemGroupFn,
	volumesInit volumes.InitVolumeGroupFn,
	processesInit processes.InitProcessGroupFn,
	tasksInit tasks.InitTaskGroupFn,

	websocketInit websockets.InitWebsocketGroupFn,
) http.InitControllers

Types

type Application

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

func New

func New(name string, logger *zap.Logger, options ...Option) (*Application, error)

func NewApp

func NewApp(o *Options, logger *zap.Logger, hs *http.Server) (*Application, error)

func (*Application) AwaitSignal

func (a *Application) AwaitSignal()

func (*Application) Start

func (a *Application) Start() error

type Option

type Option func(app *Application) error

func HttpServerOption

func HttpServerOption(svr *http.Server) Option

type Options

type Options struct {
	Name string
}

func NewOptions

func NewOptions(v *viper.Viper, logger *zap.Logger) (*Options, error)

Jump to

Keyboard shortcuts

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