MCPcopy Index your code
hub / github.com/crowdsecurity/crowdsec / GetActiveDecisionsTimeLeft

Function GetActiveDecisionsTimeLeft

pkg/exprhelpers/helpers.go:816–833  ·  view source on GitHub ↗
(params ...any)

Source from the content-addressed store, hash-verified

814}
815
816func GetActiveDecisionsTimeLeft(params ...any) (any, error) {
817 value := params[0].(string)
818
819 if dbClient == nil {
820 log.Error("No database config to call GetActiveDecisionsTimeLeft()")
821 return 0, nil
822 }
823
824 ctx := context.TODO()
825
826 timeLeft, err := dbClient.GetActiveDecisionsTimeLeftByValue(ctx, value)
827 if err != nil {
828 log.Errorf("Failed to get active decisions time left from value '%s'", value)
829 return 0, err
830 }
831
832 return timeLeft, nil
833}
834
835// func LookupHost(value string) []string {
836func LookupHost(params ...any) (any, error) {

Callers

nothing calls this directly

Calls 2

ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…