policycell

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"policy",
	"Contains policy rules",

	cell.Provide(newPolicyRepo),
	cell.Provide(newPolicyUpdater),
	cell.Provide(newPolicyImporter),
	cell.Provide(newIdentityUpdater),
	cell.Provide(newIPCacher),
	cell.Config(defaultConfig),
	metrics.Metric(newIdentityUpdaterMetrics),
)

Cell provides the PolicyRepository and PolicyUpdater.

Functions

This section is empty.

Types

type Config

type Config struct {
	EnableWellKnownIdentities bool `mapstructure:"enable-well-known-identities"`
	PolicyQueueSize           uint `mapstructure:"policy-queue-size"`
}

func (Config) Flags

func (def Config) Flags(flags *pflag.FlagSet)

type IPCacher added in v1.19.0

type IPCacher interface {
	UpsertMetadataBatch(updates ...ipcache.MU) (revision uint64)
	RemoveMetadataBatch(updates ...ipcache.MU) (revision uint64)
	WaitForRevision(ctx context.Context, rev uint64) error
}

type IdentityUpdater added in v1.18.0

type IdentityUpdater interface {
	// UpdateIdentities informs the SelectorCache of new identities, which then
	// distributes incremental updates to all endpoints. It also triggers endpoints
	// to consume the incremental updates and apply them to the BPF policy maps.
	//
	// The caller is responsible for making sure the same identity is not
	// present in both 'added' and 'deleted'.
	//
	// Returns a channel that is closed when all identities have been completely
	// programmed in the policy maps.
	UpdateIdentities(added, deleted identity.IdentityMap) <-chan struct{}
}

type PolicyImporter

type PolicyImporter interface {
	UpdatePolicy(*policytypes.PolicyUpdate)
}

Jump to

Keyboard shortcuts

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