Documentation
¶
Index ¶
- Variables
- func Enforce(ctx context.Context, clusterName string, config cmtypes.CiliumClusterConfig, ...) (stopAndWait func(), err error)
- func Get(ctx context.Context, clusterName string, backend ClusterConfigBackend) (cmtypes.CiliumClusterConfig, error)
- func RegisterEnforcer(in struct{ ... }) error
- func Set(ctx context.Context, clusterName string, config cmtypes.CiliumClusterConfig, ...) error
- type ClusterConfigBackend
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is the sentinel error returned by [clustercfg.Get] if the // cluster configuration is not found. ErrNotFound = errors.New("not found") )
Functions ¶
func Enforce ¶
func Enforce( ctx context.Context, clusterName string, config cmtypes.CiliumClusterConfig, backend ClusterConfigBackend, log *slog.Logger, ) (stopAndWait func(), err error)
Enforce synchronously writes the cluster configuration, and additionally registers a background task to periodically enforce its presence (e.g., in case the associated lease unexpectedly expired).
func Get ¶
func Get(ctx context.Context, clusterName string, backend ClusterConfigBackend) (cmtypes.CiliumClusterConfig, error)
func RegisterEnforcer ¶
func RegisterEnforcer(in struct {
cell.In
JobGroup job.Group
ClusterInfo cmtypes.ClusterInfo
ClusterConfig cmtypes.CiliumClusterConfig
Client kvstore.Client
StoreFactory store.Factory
}) error
RegisterEnforcer sets up the logic to write the cluster configuration to the kvstore, and automatically revert possible external modifications.
func Set ¶
func Set(ctx context.Context, clusterName string, config cmtypes.CiliumClusterConfig, backend ClusterConfigBackend) error
Types ¶
Click to show internal directories.
Click to hide internal directories.