Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Indicates a non-recoverable error for DeletionFallbackClient. ErrClientFailure = errors.New("client failed") )
Functions ¶
This section is empty.
Types ¶
type DeletionFallbackClient ¶
type DeletionFallbackClient struct {
// contains filtered or unexported fields
}
func NewDeletionFallbackClient ¶
func NewDeletionFallbackClient(logger *slog.Logger) *DeletionFallbackClient
NewDeletionFallbackClient creates a new deletion client.
func (*DeletionFallbackClient) EndpointDeleteMany ¶
func (dc *DeletionFallbackClient) EndpointDeleteMany(req *models.EndpointBatchDeleteRequest) error
EndpointDeleteMany deletes multiple endpoints based on the endpoint deletion request, either by directly accessing the API or dropping in a queued-deletion file.
To prevent race conditions, the logic is: 1. Try and connect to the socket and request deletion. if that succeeds, done. 2. Otherwise, take a shared lock on the delete queue directory. 3. Once we have the lock, check again to see if the deletion request succeeds. 4. Persist the request to offline queue in case of failure.
Endpoint Deletion handled by this method returns two types of errors: 1. Delete request processing errors propagated from cilium-agent(eg. NotFound, Invalid) 2. Client failure indicating a non-recoverable error(eg. when deletion queue locking during fallback fails)