Documentation
¶
Index ¶
Constants ¶
const ( FlagSkipTunnel uint8 = 1 << iota FlagRemoteCluster uint8 = 1 << 3 )
Uint8 encoding MUST mimic the one in pkg/maps/ipcache since it will eventually get recast to it
const EncryptKeyEmpty = EncryptKey(0)
Variables ¶
var ( ResourceKindCCNP = ResourceKind("ccnp") ResourceKindCIDRGroup = ResourceKind("cidrgroup") ResourceKindCNP = ResourceKind("cnp") ResourceKindDaemon = ResourceKind("daemon") ResourceKindEndpoint = ResourceKind("ep") ResourceKindFile = ResourceKind("file") ResourceKindNetpol = ResourceKind("netpol") ResourceKindNode = ResourceKind("node") )
Functions ¶
This section is empty.
Types ¶
type EncryptKey ¶
type EncryptKey uint8
EncryptKey is the identity of the encryption key. This type implements ipcache.IPMetadata
func (EncryptKey) IsValid ¶
func (e EncryptKey) IsValid() bool
func (EncryptKey) String ¶
func (e EncryptKey) String() string
func (EncryptKey) Uint8 ¶
func (e EncryptKey) Uint8() uint8
type EndpointFlags ¶ added in v1.18.0
type EndpointFlags struct {
// contains filtered or unexported fields
}
EndpointFlags represents various flags that can be attached to endpoints in the IPCache This type implements ipcache.IPMetadata
func (EndpointFlags) IsValid ¶ added in v1.18.0
func (e EndpointFlags) IsValid() bool
func (*EndpointFlags) SetRemoteCluster ¶ added in v1.18.2
func (e *EndpointFlags) SetRemoteCluster(remote bool)
func (*EndpointFlags) SetSkipTunnel ¶ added in v1.18.0
func (e *EndpointFlags) SetSkipTunnel(skip bool)
func (EndpointFlags) Uint8 ¶ added in v1.18.0
func (e EndpointFlags) Uint8() uint8
type IPListEntrySlice ¶
type IPListEntrySlice []*models.IPListEntry
func (IPListEntrySlice) Len ¶
func (s IPListEntrySlice) Len() int
func (IPListEntrySlice) Less ¶
func (s IPListEntrySlice) Less(i, j int) bool
Less sorts the IPListEntry objects by CIDR prefix then IP address. Given that the same IP cannot map to more than one identity, no further sorting is performed.
func (IPListEntrySlice) Swap ¶
func (s IPListEntrySlice) Swap(i, j int)
type IdentityUpdater ¶ added in v1.18.0
type IdentityUpdater interface {
UpdateIdentities(added, deleted identity.IdentityMap) <-chan struct{}
}
IdentityUpdater is responsible for handling identity updates into the core policy engine. See SelectorCache.UpdateIdentities() for more details.
type RequestedIdentity ¶ added in v1.15.0
type RequestedIdentity identity.NumericIdentity
RequestedIdentity is a desired numeric identity for the prefix. When the prefix is next injected, this numeric ID will be requested from the local allocator. If the allocator can accommodate that request, it will do so. In order for this to be useful, the prefix must not already have an identity (or its set of labels must have changed), and that numeric identity must be free. Thus, the numeric ID should have already been held-aside in the allocator using WithholdLocalIdentities(). That will ensure the numeric ID remains free for the prefix to request.
func (RequestedIdentity) ID ¶ added in v1.15.0
func (id RequestedIdentity) ID() identity.NumericIdentity
func (RequestedIdentity) IsValid ¶ added in v1.15.0
func (id RequestedIdentity) IsValid() bool
type ResourceID ¶
type ResourceID string
ResourceID identifies a unique copy of a resource that provides a source for information tied to an IP address in the IPCache.
func NewResourceID ¶
func NewResourceID(kind ResourceKind, namespace, name string) ResourceID
NewResourceID returns a ResourceID populated with the standard fields for uniquely identifying a source of IPCache information.
func (ResourceID) Namespace ¶ added in v1.17.0
func (r ResourceID) Namespace() string
type ResourceKind ¶
type ResourceKind string
ResourceKind determines the source of the ResourceID. Typically this is the short name for the k8s resource.
type TunnelPeer ¶
TunnelPeer is the IP address of the host associated with this prefix. This is typically used to establish a tunnel, e.g. in tunnel mode or for encryption. This type implements ipcache.IPMetadata
func (TunnelPeer) IP ¶
func (t TunnelPeer) IP() net.IP