application

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 8 Imported by: 1 module, 2 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 Application

type Application struct {
	Name    string
	Version string
	// contains filtered or unexported fields
}

Application is the application service. It contains all the services and configurations.

func New

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

New returns a new Application.

func (*Application) AwaitSignal

func (a *Application) AwaitSignal()

AwaitSignal await the signal to stop the server

func (*Application) Start

func (a *Application) Start() error

Start Application.

func (*Application) Stop

func (a *Application) Stop() error

Stop Application.

type Option

type Option func(app *Application) error

Option is the option of application.

func WithGrpcServer

func WithGrpcServer(s *grpc.Server) Option

WithGrpcServer sets the grpc server.

func WithHttpServer

func WithHttpServer(s *http.Server) Option

WithHttpServer sets the http server.

func WithMinioCli

func WithMinioCli(c *minio.Client) Option

WithMinioCli sets the minio client.

Jump to

Keyboard shortcuts

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