Documentation ¶
Index ¶
- type Ego
- func (e *Ego) Cron(w ...ecron.Ecron) *Ego
- func (e *Ego) Invoker(fns ...func() error) *Ego
- func (e *Ego) Job(runners ...ejob.Ejob) *Ego
- func (e *Ego) Registry(reg eregistry.Registry) *Ego
- func (e *Ego) Run() error
- func (e *Ego) Serve(s ...server.Server) *Ego
- func (e *Ego) Stop(ctx context.Context, isGraceful bool) (err error)
- type Option
- func WithAfterStopClean(fns ...func() error) Option
- func WithBeforeStopClean(fns ...func() error) Option
- func WithConfigPrefix(configPrefix string) Option
- func WithDisableBanner(disableBanner bool) Option
- func WithDisableFlagConfig(disableFlagConfig bool) Option
- func WithHang(flag bool) Option
- func WithShutdownSignal(signals ...os.Signal) Option
- func WithStopTimeout(timeout time.Duration) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ego ¶ added in v0.4.0
type Ego struct {
// contains filtered or unexported fields
}
Ego 分为三大部分 第一部分 系统数据:生命周期,配置前缀,锁,日志,错误 第二部分 运行程序:系统初始化函数,用户初始化函数,服务,定时任务,短时任务 第三部分 可选方法:是否悬挂,注册中心,运行停止前清理,运行停止后清理
type Option ¶
type Option func(a *Ego)
Option 可选项
func WithAfterStopClean ¶
WithAfterStopClean 设置运行后清理
func WithBeforeStopClean ¶
WithBeforeStopClean 设置运行前清理
func WithDisableBanner ¶
WithDisableBanner 禁止banner
func WithDisableFlagConfig ¶ added in v0.4.3
WithDisableFlagConfig 禁止config
func WithShutdownSignal ¶ added in v0.3.0
WithShutdownSignal 设置停止信号量
func WithStopTimeout ¶ added in v0.3.0
WithStopTimeout 设置停止的超时时间
Directories ¶
Path | Synopsis |
---|---|
client
|
|
cmd
|
|
protoc-gen-go-errors
MIT License Copyright (c) 2020 go-kratos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
MIT License Copyright (c) 2020 go-kratos Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
core
|
|
examples
|
|
internal
|
|
task
|
|
Click to show internal directories.
Click to hide internal directories.