From 0f7a25c89ff92920e72b55ca20fe1ec4b5a78e7b Mon Sep 17 00:00:00 2001 From: Patrick Jakubowski Date: Tue, 12 Nov 2024 16:45:30 -0800 Subject: [PATCH] x/exp/batch: add docs to batch Signed-off-by: Patrick Jakubowski --- x/exp/batch/batch.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/x/exp/batch/batch.go b/x/exp/batch/batch.go index 94b976f..d65e36c 100644 --- a/x/exp/batch/batch.go +++ b/x/exp/batch/batch.go @@ -1,3 +1,10 @@ +// Package batch allows for performant batch evaluations of Cedar policy given a set of principals, actions, resources, +// and/or context as variables. The batch evaluation takes advantage of a form of [partial evaluation] to whittle the +// policy set down to just those policies which refer to the set of unknown variables. This allows for queries over a +// policy set, such as "to which resources can user A connect when the request comes from outside the United States?" +// which can run much faster than a brute force trawl through every possible authorization request. +// +// [partial evaluation]: https://en.wikipedia.org/wiki/Partial_evaluation package batch import (