lib

package
v1.17.0-pre.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeletionFallbackClient

type DeletionFallbackClient struct {
	// contains filtered or unexported fields
}

func NewDeletionFallbackClient

func NewDeletionFallbackClient(logger *logrus.Entry) (*DeletionFallbackClient, error)

NewDeletionFallbackClient creates a client that will either issue an EndpointDelete request via the api, *or* queue one in a temporary directory. To prevent race conditions, the logic is: 1. Try and connect to the socket. if that succeeds, done 2. Otherwise, take a shared lock on the delete queue directory 3. Once we get the lock, check to see if the socket now exists 4. If it exists, drop the lock and use the api

func (*DeletionFallbackClient) EndpointDelete

func (dc *DeletionFallbackClient) EndpointDelete(id string) error

EndpointDelete deletes an endpoint given by an endpoint id, either by directly accessing the API or dropping in a queued-deletion file. endpoint-id is a qualified endpoint reference, e.g. "container-id:XXXXXXX"

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL