Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PolicyDataStore ¶
type PolicyDataStore interface {
// GetPolicyDatasForPolicyKeys gets the PolicyDatas from the store for the PolicyKeys.
//
// Returns the found PolicyDatas, and the input PolicyKeys that were not found, each
// ordered by the order of the input PolicyKeys.
GetPolicyDatasForPolicyKeys(context.Context, []bufpolicy.PolicyKey) (
foundPolicyDatas []bufpolicy.PolicyData,
notFoundPolicyKeys []bufpolicy.PolicyKey,
err error,
)
// PutPolicyDatas puts the PolicyDatas to the store.
PutPolicyDatas(ctx context.Context, moduleDatas []bufpolicy.PolicyData) error
}
PolicyDataStore reads and writes PolicysDatas.
func NewPolicyDataStore ¶
func NewPolicyDataStore( logger *slog.Logger, bucket storage.ReadWriteBucket, ) PolicyDataStore
NewPolicyDataStore returns a new PolicyDataStore for the given bucket.
It is assumed that the PolicyDataStore has complete control of the bucket.
This is typically used to interact with a cache directory.
Click to show internal directories.
Click to hide internal directories.