Documentation ¶
Index ¶
- func EnvServerHost() string
- func Hostname() string
- type Application
- func (app *Application) Executor(e executor.Executor)
- func (app *Application) GracefulStop(ctx context.Context) (err error)
- func (app *Application) Job(runner job.Runner) error
- func (app *Application) RegisterHooks(stage hooks.Stage, fns ...func())
- 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
- type RuntimeStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Application ¶ added in v0.3.1
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 ¶ added in v0.3.1
func DefaultApp() *Application
func New ¶ added in v0.3.1
func New(fns ...func() error) (*Application, error)
New create a new Application instance
func (*Application) Executor ¶ added in v0.4.3
func (app *Application) Executor(e executor.Executor)
Executor ...
func (*Application) GracefulStop ¶ added in v0.3.1
func (app *Application) GracefulStop(ctx context.Context) (err error)
GracefulStop application after necessary cleanup
func (*Application) Job ¶ added in v0.3.1
func (app *Application) Job(runner job.Runner) error
Job ..
func (*Application) RegisterHooks ¶ added in v0.3.1
func (app *Application) RegisterHooks(stage hooks.Stage, fns ...func())
RegisterHooks register a stage Hook
func (*Application) Run ¶ added in v0.3.1
func (app *Application) Run(servers ...server.Server) error
Run run application
func (*Application) Schedule ¶ added in v0.3.1
func (app *Application) Schedule(w worker.Worker) error
Schedule ..
func (*Application) Serve ¶ added in v0.3.1
func (app *Application) Serve(s ...server.Server) error
Serve start server
func (*Application) SetRegistry ¶ added in v0.3.1
func (app *Application) SetRegistry(reg registry.Registry)
SetRegistry set customize registry Deprecated, please use registry.DefaultRegisterer instead.
func (*Application) Startup ¶ added in v0.3.1
func (app *Application) Startup(fns ...func() error) error
Startup ..
func (*Application) Stop ¶ added in v0.3.1
func (app *Application) Stop() (err error)
Stop application immediately after necessary cleanup
func (*Application) WithOptions ¶ added in v0.3.1
func (a *Application) WithOptions(options ...Option)
type Option ¶ added in v0.3.1
type Option func(a *Application)
func WithConfigParser ¶ added in v0.3.1
func WithConfigParser(unmarshaller conf.Unmarshaller) Option
func WithDisable ¶ added in v0.3.1
type RuntimeStats ¶
type RuntimeStats struct { IP string `json:"ip"` Hostname string `json:"hostname"` Time string `json:"time"` // 每次展示数据的时间 Err string `json:"err"` }
通用状态信息
func NewRuntimeStats ¶
func NewRuntimeStats() RuntimeStats
Click to show internal directories.
Click to hide internal directories.