celproc

package
v0.0.0-...-ca83fcd Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CacheHitCounter = promauto.NewCounter(prometheus.CounterOpts{
		Name: "cel_service_cache_hit_total",
		Help: "The total number of cache hits",
	})
	BuildEvalCounter = promauto.NewCounter(prometheus.CounterOpts{
		Name: "cel_service_build_eval_total",
		Help: "The total number of building eval",
	})
)

Functions

func ClearCache

func ClearCache()

func GRPCProcCel

func GRPCProcCel(celRequest *protofiles.CelRequest) (*protofiles.CelResponse, error)

func ProcCel

func ProcCel(celModel model.CelModel) (model.CelResult, error)

func ProcCelMany

func ProcCelMany(celModels []model.CelModel) ([]model.CelResult, error)

Types

type CacheEntry

type CacheEntry struct {
	ID         string
	Expression string
	Program    cel.Program
}

Jump to

Keyboard shortcuts

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