command

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Flags  *config.Flags
	Config *config.Config
}

Command provides factories for creating Redis and Database connections from Config.

func New

func New() *Command

New creates and returns a new Command, parses CLI flags and YAML the config, and initializes the logger.

func (Command) Database

func (c Command) Database(l *logging.Logger) (*icingadb.DB, error)

Database creates and returns a new icingadb.DB connection from config.Config.

func (Command) Redis

func (c Command) Redis(l *logging.Logger) (*icingaredis.Client, error)

Redis creates and returns a new icingaredis.Client connection from config.Config.

Jump to

Keyboard shortcuts

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