Documentation
¶
Index ¶
- type Application
- func (app *Application) AfterStop(fns ...func() error)
- func (app *Application) BeforeStop(fns ...func() error)
- func (app *Application) Defer(fns ...func() error)
- func (app *Application) GracefulStop(ctx context.Context) (err error)
- func (app *Application) Run() error
- func (app *Application) Schedule(w worker.Worker) error
- func (app *Application) Serve(s server.Server) error
- func (app *Application) SetGovernor(addr string)
- func (app *Application) SetRegistry(reg registry.Registry)
- func (app *Application) SetSignalHooker(hook func(*Application))
- func (app *Application) Startup(fns ...func() error) error
- func (app *Application) Stop() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// 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 (*Application) AfterStop ¶
func (app *Application) AfterStop(fns ...func() error)
func (*Application) BeforeStop ¶
func (app *Application) BeforeStop(fns ...func() error)
func (*Application) Defer ¶
func (app *Application) Defer(fns ...func() error)
Deprecated, use AfterStop instead
func (*Application) GracefulStop ¶
func (app *Application) GracefulStop(ctx context.Context) (err error)
GracefulStop application after necessary cleanup
func (*Application) SetGovernor ¶
func (app *Application) SetGovernor(addr string)
SetGovernor governor 127.0.0.1:9990 as default governor addr
func (*Application) SetRegistry ¶
func (app *Application) SetRegistry(reg registry.Registry)
SetRegistry set customize registry
func (*Application) SetSignalHooker ¶
func (app *Application) SetSignalHooker(hook func(*Application))
SetSignalHooker set signal hooker
func (*Application) Startup ¶
func (app *Application) Startup(fns ...func() error) error
func (*Application) Stop ¶
func (app *Application) Stop() (err error)
Stop application immediately after necessary cleanup
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
jupiter
module
|
|
|
protoc-gen-go-echo
module
|
|
|
protoc-gen-go-gin
module
|
|
|
example
module
|
|
|
all/cmd/demo
command
|
|
|
client/etcd
command
|
|
|
client/gorm
command
|
|
|
client/redis
command
|
|
|
config/onelineByFile
command
|
|
|
config/onelineByFileWatch
command
|
|
|
config/onelineByRemoteConfig
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/register
command
|
|
|
http/simple
command
|
|
|
logger/command
command
|
|
|
logger/file
command
|
|
|
logger/fileByWatch
command
|
|
|
startup
command
|
|
|
worker/cron
command
|
|
|
util/xtime
https://github.com/siddontang/go/tree/master/time2
|
https://github.com/siddontang/go/tree/master/time2 |
|
server/xfasthttp
module
|
|
|
util/xgeneric
module
|
|
|
test
|
|
|
e2e
module
|
|
|
tools
|
|
|
ast_codes
command
|
|
|
jupiter
module
|
Click to show internal directories.
Click to hide internal directories.


