bufpolicystore

package
v1.56.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

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.

Jump to

Keyboard shortcuts

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