Documentation ¶
Index ¶
- type Application
- 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) Defer ¶
func (app *Application) Defer(fns ...func() error)
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 |
---|---|
example
|
|
util/xtime
https://github.com/siddontang/go/tree/master/time2
|
https://github.com/siddontang/go/tree/master/time2 |
tools
|
|
Click to show internal directories.
Click to hide internal directories.