bootstrap

package
v1.3.10 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

*

  • @description: start APP
  • @param {*}
  • @return {*}

Types

type App

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

App application

func NewApp

func NewApp(ctx context.Context, c *Config) *App

NewApp establish an APP

func (*App) Start

func (app *App) Start() error

Start start the service

type Config

type Config struct {
	APPName string
	IDC     string
	RunMode string

	Env env.AppEnv

	// conf of http service
	HTTPServer struct {
		Listen       string
		ReadTimeout  int // ms
		WriteTimeout int // ms
		IdleTimeout  int
	}
}

Config app's conf default conf/app.toml

func ParserAppConfig

func ParserAppConfig(filePath string) (*Config, error)

ParserAppConfig

Jump to

Keyboard shortcuts

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