ctiexpr

package
v1.7.8 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CTIUrl       = "https://cti.api.crowdsec.net"
	CTIUrlSuffix = "/v2/smoke/"
	CTIApiKey    = ""
)
View Source
var (
	CTIBackOffUntil    time.Time
	CTIBackOffDuration = 5 * time.Minute
)

when hitting quotas or auth errors, we temporarily disable the API

View Source
var (
	CTICache        gcache.Cache
	CacheExpiration time.Duration
)

Cache for responses

View Source
var CTIApiEnabled = false

this is set for non-recoverable errors, such as 403 when querying API or empty API key

Functions

func CrowdsecCTI

func CrowdsecCTI(params ...any) (any, error)

func CrowdsecCTI(ip string) (*cticlient.SmokeItem, error) {

func CrowdsecCTIInitCache

func CrowdsecCTIInitCache(size int, ttl time.Duration)

func InitCrowdsecCTI

func InitCrowdsecCTI(key *string, ttl *time.Duration, size *int, logLevel log.Level) error

func ShutdownCrowdsecCTI

func ShutdownCrowdsecCTI()

Types

This section is empty.

Jump to

Keyboard shortcuts

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