Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandContext ¶
type CommandContext struct {
Ctx context.Context
PluginManager *manager.PluginManager
// contains filtered or unexported fields
}
func NewCommandContext ¶
func NewCommandContext(cofideConfigFile string, customLoader manager.PluginLoader) *CommandContext
NewCommandContext returns a command context wired up with a config loader and plugin manager. If customLoader is non-nil, it may be used to load custom in-process plugins.
func (*CommandContext) HandleSignals ¶
func (cc *CommandContext) HandleSignals()
HandleSignals waits for SIGINT or SIGTERM, then triggers a clean shutdown using the command context. It should be called from a non-main goroutine.
func (*CommandContext) SetLogLevel ¶ added in v0.6.0
func (cc *CommandContext) SetLogLevel(level slog.Level)
SetLogLevel sets the log level of the default handler and gRPC plugins.
func (*CommandContext) Shutdown ¶
func (cc *CommandContext) Shutdown()
func (*CommandContext) UpdateConfigFile ¶ added in v0.25.0
func (cc *CommandContext) UpdateConfigFile(path string)
UpdateConfigFile replaces the config file path used by the plugin manager.
Click to show internal directories.
Click to hide internal directories.