Documentation ¶
Overview ¶
Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0
Copyright 2022 VMware, Inc. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Enforcer ¶
type Enforcer interface { // Enforce policy to the specified workload with options. Enforce(ctx context.Context, workload *rcworkload.Workload, option ...enforcement.Option) error // Revoke policy from the specified workload. Revoke(ctx context.Context, workload *rcworkload.Workload) error // HasBeenEnforced checks if the workload is managed by the policy. HasBeenEnforced(ctx context.Context, workload *rcworkload.Workload) (bool, error) }
Enforcer to enforce policy.
func GetEnforcer ¶
func GetEnforcer(name string, option ...EnforcerOption) (Enforcer, error)
GetEnforcer returns enforcer by name. Optional options provided.
func NewNetworkPolicyEnforcer ¶
func NewNetworkPolicyEnforcer(option ...EnforcerOption) (Enforcer, error)
NewNetworkPolicyEnforcer is constructor of network policy enforcer.
type EnforcerOption ¶
type EnforcerOption func(options *EnforcerOptions)
EnforcerOption defines option for the enforcer.
func WithScheme ¶
func WithScheme(scheme *runtime.Scheme) EnforcerOption
WithScheme sets what scheme will use.
type EnforcerOptions ¶
type EnforcerOptions struct {
// contains filtered or unexported fields
}
EnforcerOptions defines options for the enforcer.
func (*EnforcerOptions) From ¶
func (eo *EnforcerOptions) From(option ...EnforcerOption)
From options.
Click to show internal directories.
Click to hide internal directories.