auctioncellrep

package
v0.1442.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCellIdMismatch = errors.New("workload cell ID does not match this cell")
View Source
var ErrCellUnhealthy = errors.New("internal cell healthcheck failed")
View Source
var ErrNotEnoughMemory = errors.New("not enough memory for container and additional memory allocation")

Functions

func GenerateGuid

func GenerateGuid() (string, error)

Types

type AuctionCellClient

type AuctionCellClient interface {
	State(logger lager.Logger) (rep.CellState, bool, error)
	Perform(logger lager.Logger, traceID string, work rep.Work) (rep.Work, error)
	Reset() error
}

type AuctionCellRep

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

func New

func New(
	cellID string,
	cellIndex int,
	repURL string,
	preloadedStackPathMap rep.StackPathMap,
	containerMetricsProvider rep.ContainerMetricsProvider,
	arbitraryRootFSes []string,
	zone string,
	client executor.Client,
	evacuationReporter evacuation_context.EvacuationReporter,
	placementTags []string,
	optionalPlacementTags []string,
	proxyMemoryAllocation int,
	enableContainerProxy bool,
	allocator BatchContainerAllocator,
) *AuctionCellRep

func (*AuctionCellRep) Metrics

func (a *AuctionCellRep) Metrics(logger lager.Logger) (*rep.ContainerMetricsCollection, error)

func (*AuctionCellRep) Perform

func (a *AuctionCellRep) Perform(logger lager.Logger, traceID string, work rep.Work) (rep.Work, error)

func (*AuctionCellRep) Reset

func (a *AuctionCellRep) Reset() error

func (*AuctionCellRep) State

func (a *AuctionCellRep) State(logger lager.Logger) (rep.CellState, bool, error)

type BatchContainerAllocator

type BatchContainerAllocator interface {
	BatchLRPAllocationRequest(lager.Logger, string, bool, int, []rep.LRP) []rep.LRP
	BatchTaskAllocationRequest(lager.Logger, string, []rep.Task) []rep.Task
}

func NewContainerAllocator

func NewContainerAllocator(instanceGuidGenerator func() (string, error), stackPathMap rep.StackPathMap, executorClient executor.Client) BatchContainerAllocator

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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