server

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cmd *cobra.Command, opt ServerOptions) (*core.App, error)

New returns new Azugo pre-configured core server with default configuration.

func Run added in v0.4.0

func Run(a Runnable)

Run starts an application and waits for it to finish

Types

type Runnable added in v0.4.0

type Runnable interface {
	Start() error
	Log() *zap.Logger
	Stop()
}

Runnable provides methods to run application that will gracefully stop

type ServerOptions

type ServerOptions struct {
	// AppName is the name of the application.
	AppName string
	// AppVer is the version of the application.
	AppVer string
	// AppBuiltWith is the server build tags.
	AppBuiltWith string

	// Configuration object that implements config.Configurable interface.
	Configuration any
}

Jump to

Keyboard shortcuts

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