context

package
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

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) *CommandContext

NewCommandContext returns a command context wired up with a config loader and plugin manager.

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()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL