require

package
v1.7.4-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAgentDisabled = errors.New("log processor is disabled -- this command cannot run on a LAPI-only instance")

Functions

func Agent

func Agent(c *csconfig.Config) error

func CAPI

func CAPI(c *csconfig.Config) error

func CAPIRegistered

func CAPIRegistered(c *csconfig.Config) error

func DB

func DB(c *csconfig.Config) error

func DBClient

func DBClient(ctx context.Context, dbcfg *csconfig.DatabaseCfg) (*database.Client, error)

func Hub

func Hub(c *csconfig.Config, logger *logrus.Logger) (*cwhub.Hub, error)

Hub initializes the hub. If a remote configuration is provided, it can be used to download the index and items. If no remote parameter is provided, the hub can only be used for local operations.

func HubBranch

func HubBranch(ctx context.Context, cfg *csconfig.Config) (string, error)

HubBranch sets the branch (in cscli config) and returns its value It can be "master", or the branch corresponding to the current crowdsec version, or the value overridden in config/flag

func HubDownloader

func HubDownloader(ctx context.Context, c *csconfig.Config) (*cwhub.Downloader, error)

func HubURLTemplate

func HubURLTemplate(cfg *csconfig.Config) string

func LAPI

func LAPI(c *csconfig.Config) error

func LAPINoOnlineCreds

func LAPINoOnlineCreds(c *csconfig.Config) error

LAPINoOnlineCreds is a variant of LAPI that does not attempt to load and use capi credentials.

func PAPI

func PAPI(c *csconfig.Config) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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