Documentation
¶
Index ¶
- Constants
- type Application
- func (app *Application) GracefulStop(ctx context.Context) (err error)
- func (app *Application) Job(runner job.Runner) error
- func (app *Application) RegisterHooks(k uint32, fns ...func() error) error
- func (app *Application) Run(servers ...server.Server) error
- func (app *Application) Schedule(w worker.Worker) error
- func (app *Application) Serve(s ...server.Server) error
- func (app *Application) SetRegistry(reg registry.Registry)
- func (app *Application) Startup(fns ...func() error) error
- func (app *Application) Stop() (err error)
- func (a *Application) WithOptions(options ...Option)
- type Disable
- type Option
Constants ¶
View Source
const ( //StageAfterStop after app stop StageAfterStop uint32 = iota + 1 //StageBeforeStop before app stop StageBeforeStop )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
HideBanner bool
// contains filtered or unexported fields
}
Application is the framework's instance, it contains the servers, workers, client and configuration settings. Create an instance of Application, by using &Application{}
func DefaultApp ¶
func DefaultApp() *Application
func (*Application) GracefulStop ¶
func (app *Application) GracefulStop(ctx context.Context) (err error)
GracefulStop application after necessary cleanup
func (*Application) RegisterHooks ¶
func (app *Application) RegisterHooks(k uint32, fns ...func() error) error
RegisterHooks register a stage Hook
func (*Application) Run ¶
func (app *Application) Run(servers ...server.Server) error
Run run application
func (*Application) Serve ¶
func (app *Application) Serve(s ...server.Server) error
Serve start server
func (*Application) SetRegistry ¶
func (app *Application) SetRegistry(reg registry.Registry)
SetRegistry set customize registry
func (*Application) Stop ¶
func (app *Application) Stop() (err error)
Stop application immediately after necessary cleanup
func (*Application) WithOptions ¶
func (a *Application) WithOptions(options ...Option)
type Option ¶
type Option func(a *Application)
func WithConfigParser ¶
func WithConfigParser(unmarshaller conf.Unmarshaller) Option
func WithDisable ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
example
|
|
|
all/cmd/demo
command
|
|
|
build
command
|
|
|
client/etcd
command
|
|
|
client/gorm
command
|
|
|
client/redis
command
|
|
|
client/rocketmq
command
|
|
|
config/onelineByEtcdv3
command
|
|
|
config/onelineByFile
command
|
|
|
config/onelineByFileWatch
command
|
|
|
config/onelineByRemoteConfig
command
|
|
|
config/onelinebyApollo
command
|
|
|
config/structByFile
command
|
|
|
config/structByFileWatch
command
|
|
|
config/structByRemoteConfigWatch
command
|
|
|
config/structByremoteConfig
command
|
|
|
grpc/direct/direct-client
command
|
|
|
grpc/direct/direct-server
command
|
|
|
grpc/etcd/etcd-client
command
|
|
|
grpc/etcd/etcd-server
command
|
|
|
helloworld
command
|
|
|
http/all
command
|
|
|
http/gin
command
|
|
|
http/gin-swagger
command
|
|
|
http/gin_ws_cors
command
|
|
|
http/gofame
command
|
|
|
http/register
command
|
|
|
http/simple
command
|
|
|
job
command
|
|
|
logger/command
command
|
|
|
logger/file
command
|
|
|
logger/fileByWatch
command
|
|
|
monitor
command
|
|
|
remoteconfig
command
|
|
|
sentinel
command
|
|
|
simple
command
|
|
|
startup
command
|
|
|
store/mongo
command
|
|
|
trace
command
|
|
|
worker/cron
command
|
|
|
util/xbuffer
Package buffer provides an implementation of an unbounded buffer.
|
Package buffer provides an implementation of an unbounded buffer. |
|
util/xtime
https://github.com/siddontang/go/tree/master/time2
|
https://github.com/siddontang/go/tree/master/time2 |
|
tools
|
|
|
ast_codes
command
|
|
|
jupiter
module
|
Click to show internal directories.
Click to hide internal directories.

