Documentation ¶
Index ¶
- type AddInterfaceFunc
- type AddInterfaceFuncs
- type Callbacks
- type CbID
- type IPSetsDataplane
- type IPSetsManager
- func (m *IPSetsManager) AddDataplane(dp IPSetsDataplane)
- func (m *IPSetsManager) CompleteDeferredWork() error
- func (m *IPSetsManager) GetIPSetMembers(setID string) (members set.Set[string], err error)
- func (m *IPSetsManager) GetIPSetType(setID string) (typ ipsets.IPSetType, err error)
- func (m *IPSetsManager) OnUpdate(msg interface{})
- type MockIPSets
- func (s *MockIPSets) AddMembers(setID string, newMembers []string)
- func (s *MockIPSets) AddOrReplaceIPSet(setMetadata ipsets.IPSetMetadata, newMembers []string)
- func (s *MockIPSets) ApplyDeletions()
- func (s *MockIPSets) ApplyUpdates()
- func (s *MockIPSets) GetIPFamily() ipsets.IPFamily
- func (s *MockIPSets) GetMembers(setID string) (set.Set[string], error)
- func (s *MockIPSets) GetTypeOf(setID string) (ipsets.IPSetType, error)
- func (s *MockIPSets) QueueResync()
- func (s *MockIPSets) RemoveIPSet(setID string)
- func (s *MockIPSets) RemoveMembers(setID string, removedMembers []string)
- func (s *MockIPSets) SetFilter(ipSetNames set.Set[string])
- type RemoveHostEndpointFunc
- type RemoveHostEndpointFuncs
- type RemoveInterfaceFunc
- type RemoveInterfaceFuncs
- type RemoveWorkloadEndpointFunc
- type RemoveWorkloadEndpointFuncs
- type UpdateHostEndpointFunc
- type UpdateHostEndpointFuncs
- type UpdateInterfaceFunc
- type UpdateInterfaceFuncs
- type UpdateWorkloadEndpointFunc
- type UpdateWorkloadEndpointFuncs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddInterfaceFunc ¶
type AddInterfaceFunc func(ifaceName string, hostEPID proto.HostEndpointID)
type AddInterfaceFuncs ¶
type AddInterfaceFuncs struct {
// contains filtered or unexported fields
}
func (*AddInterfaceFuncs) Append ¶
func (fs *AddInterfaceFuncs) Append(f AddInterfaceFunc) *CbID
func (*AddInterfaceFuncs) Invoke ¶
func (fs *AddInterfaceFuncs) Invoke(ifaceName string, hostEPID proto.HostEndpointID)
type Callbacks ¶
type Callbacks struct { AddInterfaceV4 *AddInterfaceFuncs RemoveInterfaceV4 *RemoveInterfaceFuncs UpdateInterfaceV4 *UpdateInterfaceFuncs UpdateHostEndpointV4 *UpdateHostEndpointFuncs RemoveHostEndpointV4 *RemoveHostEndpointFuncs UpdateWorkloadEndpointV4 *UpdateWorkloadEndpointFuncs RemoveWorkloadEndpointV4 *RemoveWorkloadEndpointFuncs }
func NewCallbacks ¶
func NewCallbacks() *Callbacks
type IPSetsDataplane ¶
type IPSetsDataplane interface { AddOrReplaceIPSet(setMetadata ipsets.IPSetMetadata, members []string) AddMembers(setID string, newMembers []string) RemoveMembers(setID string, removedMembers []string) RemoveIPSet(setID string) GetIPFamily() ipsets.IPFamily GetTypeOf(setID string) (ipsets.IPSetType, error) GetMembers(setID string) (set.Set[string], error) QueueResync() ApplyUpdates() ApplyDeletions() }
type IPSetsManager ¶
type IPSetsManager struct {
// contains filtered or unexported fields
}
Except for domain IP sets, IPSetsManager simply passes through IP set updates from the datastore to the ipsets.IPSets dataplane layer. For domain IP sets - which hereafter we'll just call "domain sets" - IPSetsManager handles the resolution from domain names to expiring IPs.
func NewIPSetsManager ¶
func NewIPSetsManager(ipsets_ IPSetsDataplane, maxIPSetSize int) *IPSetsManager
func (*IPSetsManager) AddDataplane ¶
func (m *IPSetsManager) AddDataplane(dp IPSetsDataplane)
func (*IPSetsManager) CompleteDeferredWork ¶
func (m *IPSetsManager) CompleteDeferredWork() error
func (*IPSetsManager) GetIPSetMembers ¶
func (*IPSetsManager) GetIPSetType ¶
func (m *IPSetsManager) GetIPSetType(setID string) (typ ipsets.IPSetType, err error)
func (*IPSetsManager) OnUpdate ¶
func (m *IPSetsManager) OnUpdate(msg interface{})
type MockIPSets ¶
type MockIPSets struct { Members map[string]set.Set[string] Metadata map[string]ipsets.IPSetMetadata AddOrReplaceCalled bool }
func NewMockIPSets ¶
func NewMockIPSets() *MockIPSets
func (*MockIPSets) AddMembers ¶
func (s *MockIPSets) AddMembers(setID string, newMembers []string)
func (*MockIPSets) AddOrReplaceIPSet ¶
func (s *MockIPSets) AddOrReplaceIPSet(setMetadata ipsets.IPSetMetadata, newMembers []string)
func (*MockIPSets) ApplyDeletions ¶
func (s *MockIPSets) ApplyDeletions()
func (*MockIPSets) ApplyUpdates ¶
func (s *MockIPSets) ApplyUpdates()
func (*MockIPSets) GetIPFamily ¶
func (s *MockIPSets) GetIPFamily() ipsets.IPFamily
func (*MockIPSets) GetMembers ¶
func (*MockIPSets) GetTypeOf ¶
func (s *MockIPSets) GetTypeOf(setID string) (ipsets.IPSetType, error)
func (*MockIPSets) QueueResync ¶
func (s *MockIPSets) QueueResync()
func (*MockIPSets) RemoveIPSet ¶
func (s *MockIPSets) RemoveIPSet(setID string)
func (*MockIPSets) RemoveMembers ¶
func (s *MockIPSets) RemoveMembers(setID string, removedMembers []string)
type RemoveHostEndpointFunc ¶
type RemoveHostEndpointFunc func(hostEPID proto.HostEndpointID)
type RemoveHostEndpointFuncs ¶
type RemoveHostEndpointFuncs struct {
// contains filtered or unexported fields
}
func (*RemoveHostEndpointFuncs) Append ¶
func (fs *RemoveHostEndpointFuncs) Append(f RemoveHostEndpointFunc) *CbID
func (*RemoveHostEndpointFuncs) Invoke ¶
func (fs *RemoveHostEndpointFuncs) Invoke(hostEPID proto.HostEndpointID)
type RemoveInterfaceFunc ¶
type RemoveInterfaceFunc func(ifaceName string)
type RemoveInterfaceFuncs ¶
type RemoveInterfaceFuncs struct {
// contains filtered or unexported fields
}
func (*RemoveInterfaceFuncs) Append ¶
func (fs *RemoveInterfaceFuncs) Append(f RemoveInterfaceFunc) *CbID
func (*RemoveInterfaceFuncs) Invoke ¶
func (fs *RemoveInterfaceFuncs) Invoke(ifaceName string)
type RemoveWorkloadEndpointFunc ¶
type RemoveWorkloadEndpointFunc func(old *proto.WorkloadEndpoint)
type RemoveWorkloadEndpointFuncs ¶
type RemoveWorkloadEndpointFuncs struct {
// contains filtered or unexported fields
}
func (*RemoveWorkloadEndpointFuncs) Append ¶
func (fs *RemoveWorkloadEndpointFuncs) Append(f RemoveWorkloadEndpointFunc) *CbID
func (*RemoveWorkloadEndpointFuncs) Invoke ¶
func (fs *RemoveWorkloadEndpointFuncs) Invoke(old *proto.WorkloadEndpoint)
type UpdateHostEndpointFunc ¶
type UpdateHostEndpointFunc func(hostEPID proto.HostEndpointID)
type UpdateHostEndpointFuncs ¶
type UpdateHostEndpointFuncs struct {
// contains filtered or unexported fields
}
func (*UpdateHostEndpointFuncs) Append ¶
func (fs *UpdateHostEndpointFuncs) Append(f UpdateHostEndpointFunc) *CbID
func (*UpdateHostEndpointFuncs) Invoke ¶
func (fs *UpdateHostEndpointFuncs) Invoke(hostEPID proto.HostEndpointID)
type UpdateInterfaceFunc ¶
type UpdateInterfaceFunc func(ifaceName string, newHostEPID proto.HostEndpointID)
type UpdateInterfaceFuncs ¶
type UpdateInterfaceFuncs struct {
// contains filtered or unexported fields
}
func (*UpdateInterfaceFuncs) Append ¶
func (fs *UpdateInterfaceFuncs) Append(f UpdateInterfaceFunc) *CbID
func (*UpdateInterfaceFuncs) Invoke ¶
func (fs *UpdateInterfaceFuncs) Invoke(ifaceName string, newHostEPID proto.HostEndpointID)
type UpdateWorkloadEndpointFunc ¶
type UpdateWorkloadEndpointFunc func(old, new *proto.WorkloadEndpoint)
type UpdateWorkloadEndpointFuncs ¶
type UpdateWorkloadEndpointFuncs struct {
// contains filtered or unexported fields
}
func (*UpdateWorkloadEndpointFuncs) Append ¶
func (fs *UpdateWorkloadEndpointFuncs) Append(f UpdateWorkloadEndpointFunc) *CbID
func (*UpdateWorkloadEndpointFuncs) Invoke ¶
func (fs *UpdateWorkloadEndpointFuncs) Invoke(old, new *proto.WorkloadEndpoint)
Click to show internal directories.
Click to hide internal directories.