Documentation
¶
Index ¶
- func AppModuleRegister(name string, module IAppModule, depends []string)
- func GetModules() map[string]*AppModule
- func GetReadyModules() []string
- func GetServeNames() []string
- func GetServeNamesByModule(module string) []string
- func GetServes() map[string]AppServe
- func InitializeCmds(cmd string, parent *cobra.Command, opts ...AppCmdOption) error
- func InitializeModules(appConfig interface{}, opts ...AppModuleOption) error
- func RegisterCmd(name string, cmd *cobra.Command, modules []string)
- func RegisterServe(name string, module string, serve IAppServe) error
- func StartServe(ctx context.Context, module string, serve string) error
- func StartServes(ctx context.Context, serves []string) error
- func StopServes() error
- type AppCmd
- type AppCmdOption
- type AppCmdOptions
- type AppModule
- type AppModuleOption
- type AppModuleOptions
- type AppServe
- type IAppModule
- type IAppServe
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppModuleRegister ¶
func AppModuleRegister(name string, module IAppModule, depends []string)
func GetModules ¶
func GetReadyModules ¶
func GetReadyModules() []string
func GetServeNames ¶
func GetServeNames() []string
func GetServeNamesByModule ¶
func InitializeCmds ¶
func InitializeCmds(cmd string, parent *cobra.Command, opts ...AppCmdOption) error
func InitializeModules ¶
func InitializeModules(appConfig interface{}, opts ...AppModuleOption) error
func StopServes ¶
func StopServes() error
Types ¶
type AppCmdOption ¶
type AppCmdOption func(*AppCmdOptions)
type AppCmdOptions ¶
type AppCmdOptions struct { }
type AppModule ¶
type AppModule struct { Name string Module IAppModule Depends []string Ready bool }
type AppModuleOption ¶
type AppModuleOption func(*AppModuleOptions)
func WithModules ¶
func WithModules(modules []string) AppModuleOption
type AppModuleOptions ¶
type AppModuleOptions struct {
// contains filtered or unexported fields
}
type IAppModule ¶
Click to show internal directories.
Click to hide internal directories.