reapers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocationInfo added in v0.2.0

type AllocationInfo interface {
	Info(allocID string, q *nomad_api.QueryOptions) (*nomad_api.Allocation, *nomad_api.QueryMeta, error)
}

type EndpointGetter added in v0.2.0

type EndpointGetter interface {
	EndpointGet(id string) (*models.Endpoint, error)
}

type EndpointLister added in v0.2.0

type EndpointLister interface {
	EndpointList() ([]*models.Endpoint, error)
}

type EndpointPatcher added in v0.2.0

type EndpointPatcher interface {
	EndpointPatch(id string, ep *models.EndpointChangeRequest) error
}

type EndpointReaper

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

func NewEndpointReaper

func NewEndpointReaper(ciliumClient EndpointUpdater, nomadAllocations AllocationInfo, nomadEventStream EventStreamer, nodeID string) (*EndpointReaper, error)

NewEndpointReaper creates a new EndpointReaper. This will run an initial reconciliation before returning the reaper

func (*EndpointReaper) Run

func (e *EndpointReaper) Run(ctx context.Context) (<-chan bool, error)

Run the reaper until the context given in the contructor is cancelled. This function is non blocking and will only return errors if something occurs during startup return a channel to notify of consul client failures

type EndpointUpdater added in v0.2.0

type EndpointUpdater interface {
	EndpointLister
	EndpointGetter
	EndpointPatcher
}

type EventStreamer added in v0.2.0

type EventStreamer interface {
	Stream(ctx context.Context, topics map[nomad_api.Topic][]string, index uint64, q *nomad_api.QueryOptions) (<-chan *nomad_api.Events, error)
}

type NodeReaper

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

func NewNodeReaper

func NewNodeReaper(ctx context.Context, nomad_client *nomad_api.Client, consul_client *consul_api.Client) (*NodeReaper, error)

NewNodeReaper creates a new NodeReaper. This will run an initial reconciliation before returning the reaper

func (*NodeReaper) Run

func (n *NodeReaper) Run() (<-chan bool, error)

Run the reaper until the context given in the contructor is cancelled. This function is non blocking and will only return errors if something occurs during startup return a channel to notify of nomad client failure

Jump to

Keyboard shortcuts

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