Documentation
¶
Index ¶
- func InitializeAggregateStore(db *gorm.DB) (store.Interface, error)
- func InitializeHandler(db *gorm.DB) *handler.Handler
- func InitializeStore(db *gorm.DB) (store4.IStore, error)
- func InstallGenericAPI(engine *gin.Engine)
- func InstallJobAPI(engine *gin.Engine, db *gorm.DB)
- type Config
- type RESTServer
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallGenericAPI ¶
InstallGenericAPI 注册业务无关的路由,例如 pprof、404 处理等.
Types ¶
type Config ¶
type Config struct {
HealthOptions *genericoptions.HealthOptions
MySQLOptions *genericoptions.MySQLOptions
RedisOptions *genericoptions.RedisOptions
WatchOptions *watch.Options
HTTPOptions *genericoptions.HTTPOptions
TLSOptions *genericoptions.TLSOptions
DisableRESTServer bool
// The maximum concurrency event of user watcher.
UserWatcherMaxWorkers int64
// The list of watchers that should be disabled.
Client clientset.Interface
// Created from MySQLOptions.
DB *gorm.DB
}
Config contains application-related configurations.
func (*Config) CreateWatcherConfig ¶
func (cfg *Config) CreateWatcherConfig() (*watcher.AggregateConfig, error)
CreateWatcherConfig used to create configuration used by all watcher.
type RESTServer ¶
type RESTServer struct {
// contains filtered or unexported fields
}
RESTServer 定义一个使用 Gin 框架开发的 HTTP 服务器.
func NewRESTServer ¶
func NewRESTServer(httpOptions *genericoptions.HTTPOptions, tlsOptions *genericoptions.TLSOptions, db *gorm.DB) *RESTServer
func (*RESTServer) GracefulStop ¶
func (s *RESTServer) GracefulStop(ctx context.Context)
GracefulStop 优雅停止服务器.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package biz is the place where you can implements more complex business logic.
|
Package biz is the place where you can implements more complex business logic. |
|
pkg
|
|
|
nolint: dupl
|
nolint: dupl |
|
Package watcher provides functions used by all watchers.
|
Package watcher provides functions used by all watchers. |
|
clean
Package clean is a watcher implement.
|
Package clean is a watcher implement. |
|
cronjob/cronjob
Package cronjob is a watcher implement.
|
Package cronjob is a watcher implement. |
|
cronjob/statesync
Package statesync is a watcher implement.
|
Package statesync is a watcher implement. |
|
secretsclean
Package secretsclean is a watcher implement used to delete expired keys from the database.
|
Package secretsclean is a watcher implement used to delete expired keys from the database. |
|
user
Package user is a watcher implement.
|
Package user is a watcher implement. |
Click to show internal directories.
Click to hide internal directories.