service

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AdminRoot = ""

AdminRoot cache

View Source
var AdminRootLen = 0

AdminRootLen cache

View Source
var AppFileServer http.Handler

AppFileServer static file server

View Source
var Guards = map[string]gin.HandlerFunc{
	"bearer-jwt":   guardBearerJWT,
	"cross-origin": guardCrossOrigin,
	"table-guard":  table_v0.Guard,
	"widget-table": table.Guard,
	"widget-form":  form.Guard,
	"widget-chart": chart.Guard,
}

Guards middlewares

View Source
var Middlewares = []gin.HandlerFunc{
	BinStatic,
}

Middlewares 服务中间件

View Source
var XGenFileServerV0 http.Handler = http.FileServer(data.XgenV0())

XGenFileServerV0 XGen v0.9

View Source
var XGenFileServerV1 http.Handler = http.FileServer(data.XgenV1())

XGenFileServerV1 XGen v1.0

Functions

func BinStatic

func BinStatic(c *gin.Context)

BinStatic 静态文件服务

func SetupStatic added in v0.10.2

func SetupStatic() error

SetupStatic setup static file server

func Start

func Start() error

Start 启动服务

func StartWithouttSession

func StartWithouttSession()

StartWithouttSession 启动服务

func Stop

func Stop(onComplete func())

Stop 关闭服务

func StopWatch added in v0.10.1

func StopWatch()

StopWatch stop watching the code change

func StopWithContext added in v0.10.1

func StopWithContext(ctx context.Context, onComplete func())

StopWithContext stop with timeout

func StopWithouttSession

func StopWithouttSession(onComplete func())

StopWithouttSession 关闭服务

func Watch

func Watch(cfg config.Config) (err error)

Watch the application code change for hot update

Types

type Dir added in v0.10.2

type Dir string

Dir files

func (Dir) Open added in v0.10.2

func (d Dir) Open(name string) (http.File, error)

Open implements FileSystem using os.Open, opening files for reading rooted and relative to the directory d.

Jump to

Keyboard shortcuts

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