Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatapathRegenerationLevel ¶
type DatapathRegenerationLevel int
DatapathRegenerationLevel determines what is expected of the datapath when a regeneration event is processed.
const ( // RegenerateWithoutDatapath indicates that datapath rebuild or reload // is not required to implement this regeneration. RegenerateWithoutDatapath DatapathRegenerationLevel = iota // RegenerateWithDatapathLoad indicates that the datapath must be // reloaded but not recompiled to implement this regeneration. RegenerateWithDatapathLoad // RegenerateWithDatapathRewrite indicates that the datapath must be // recompiled and reloaded to implement this regeneration. RegenerateWithDatapathRewrite // RegenerateWithDatapathRebuild indicates that the datapath must be // fully recompiled and reloaded without using any cached templates. RegenerateWithDatapathRebuild )
func (DatapathRegenerationLevel) String ¶
func (r DatapathRegenerationLevel) String() string
String converts a DatapathRegenerationLevel into a human-readable string.
type EndpointInfoSource ¶
type EndpointInfoSource interface { UnconditionalRLock() RUnlock() GetID() uint64 GetIPv4Address() string GetIPv6Address() string GetIdentity() identity.NumericIdentity GetLabels() []string GetLabelsSHA() string HasSidecarProxy() bool ConntrackName() string GetIngressPolicyEnabledLocked() bool GetEgressPolicyEnabledLocked() bool ProxyID(l4 *policy.L4Filter) string }
EndpointInfoSource returns information about an endpoint being proxied. The read lock must be held when calling any method.
type EndpointUpdater ¶
type EndpointUpdater interface { EndpointInfoSource // OnProxyPolicyUpdate is called when the proxy acknowledges that it // has applied a policy. OnProxyPolicyUpdate(policyRevision uint64) // UpdateProxyStatistics updates the Endpoint's proxy statistics to account // for a new observed flow with the given characteristics. UpdateProxyStatistics(l7Protocol string, port uint16, ingress, request bool, verdict accesslog.FlowVerdict) }
EndpointUpdater returns information about an endpoint being proxied and is called back to update the endpoint when proxy events occur. This is a subset of `Endpoint`.
type ExternalRegenerationMetadata ¶
type ExternalRegenerationMetadata struct { // Reason provides context to source for the regeneration, which is // used to generate useful log messages. Reason string // RegenerationLevel forces datapath regeneration according to the // levels defined in the DatapathRegenerationLevel description. RegenerationLevel DatapathRegenerationLevel ParentContext context.Context }
ExternalRegenerationMetadata contains any information about a regeneration that the endpoint subsystem should be made aware of for a given endpoint.
type Owner ¶
type Owner interface { // Must return the policy repository GetPolicyRepository() *policy.Repository // UpdateProxyRedirect must update the redirect configuration of an endpoint in the proxy UpdateProxyRedirect(e EndpointUpdater, l4 *policy.L4Filter, proxyWaitGroup *completion.WaitGroup) (uint16, error, revert.FinalizeFunc, revert.RevertFunc) // RemoveProxyRedirect must remove the redirect installed by UpdateProxyRedirect RemoveProxyRedirect(e EndpointInfoSource, id string, proxyWaitGroup *completion.WaitGroup) (error, revert.FinalizeFunc, revert.RevertFunc) // UpdateNetworkPolicy adds or updates a network policy in the set // published to L7 proxies. UpdateNetworkPolicy(e EndpointUpdater, policy *policy.L4Policy, proxyWaitGroup *completion.WaitGroup) (error, revert.RevertFunc) // RemoveNetworkPolicy removes a network policy from the set published to // L7 proxies. RemoveNetworkPolicy(e EndpointInfoSource) // QueueEndpointBuild puts the given endpoint in the processing queue QueueEndpointBuild(ctx context.Context, epID uint64) (func(), error) // RemoveFromEndpointQueue removes an endpoint from the working queue RemoveFromEndpointQueue(epID uint64) // GetCompilationLock returns the mutex responsible for synchronizing compilation // of BPF programs. GetCompilationLock() *lock.RWMutex // SendNotification is called to emit an agent notification SendNotification(typ monitorAPI.AgentNotification, text string) error // Datapath returns a reference to the datapath implementation. Datapath() datapath.Datapath // GetNodeSuffix returns the suffix to be appended to kvstore keys of this GetNodeSuffix() string // UpdateIdentities propagates identity updates to selectors UpdateIdentities(added, deleted cache.IdentityCache) }
Owner is the interface defines the requirements for anybody owning policies.