Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActualLRPLifecycleController

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

func NewActualLRPLifecycleController

func NewActualLRPLifecycleController(
	db db.ActualLRPDB,
	suspectDB db.SuspectDB,
	evacuationDB db.EvacuationDB,
	desiredLRPDB db.DesiredLRPDB,
	auctioneerClient auctioneer.Client,
	serviceClient serviceclient.ServiceClient,
	repClientFactory rep.ClientFactory,
	actualHub events.Hub,
	actualLRPInstanceHub events.Hub,
) *ActualLRPLifecycleController

func (*ActualLRPLifecycleController) ClaimActualLRP

func (h *ActualLRPLifecycleController) ClaimActualLRP(ctx context.Context, logger lager.Logger, processGUID string, index int32, actualLRPInstanceKey *models.ActualLRPInstanceKey) error

func (*ActualLRPLifecycleController) CrashActualLRP

func (h *ActualLRPLifecycleController) CrashActualLRP(ctx context.Context, logger lager.Logger, actualLRPKey *models.ActualLRPKey, actualLRPInstanceKey *models.ActualLRPInstanceKey, errorMessage string) error

func (*ActualLRPLifecycleController) FailActualLRP

func (h *ActualLRPLifecycleController) FailActualLRP(ctx context.Context, logger lager.Logger, key *models.ActualLRPKey, errorMessage string) error

func (*ActualLRPLifecycleController) RemoveActualLRP

func (h *ActualLRPLifecycleController) RemoveActualLRP(ctx context.Context, logger lager.Logger, processGUID string, index int32, instanceKey *models.ActualLRPInstanceKey) error

func (*ActualLRPLifecycleController) RetireActualLRP

func (h *ActualLRPLifecycleController) RetireActualLRP(ctx context.Context, logger lager.Logger, key *models.ActualLRPKey) error

func (*ActualLRPLifecycleController) StartActualLRP

func (h *ActualLRPLifecycleController) StartActualLRP(ctx context.Context, logger lager.Logger, actualLRPKey *models.ActualLRPKey, actualLRPInstanceKey *models.ActualLRPInstanceKey, actualLRPNetInfo *models.ActualLRPNetInfo) error

type EvacuationController

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

func NewEvacuationController

func NewEvacuationController(
	db db.EvacuationDB,
	actualLRPDB db.ActualLRPDB,
	suspectLRPDB db.SuspectDB,
	desiredLRPDB db.DesiredLRPDB,
	auctioneerClient auctioneer.Client,
	actualHub events.Hub,
	actualLRPInstanceHub events.Hub,
) *EvacuationController

func (*EvacuationController) EvacuateClaimedActualLRP

func (h *EvacuationController) EvacuateClaimedActualLRP(ctx context.Context, logger lager.Logger, actualLRPKey *models.ActualLRPKey, actualLRPInstanceKey *models.ActualLRPInstanceKey) (bool, error)

func (*EvacuationController) EvacuateCrashedActualLRP

func (h *EvacuationController) EvacuateCrashedActualLRP(ctx context.Context, logger lager.Logger, actualLRPKey *models.ActualLRPKey, actualLRPInstanceKey *models.ActualLRPInstanceKey, errorMessage string) error

func (*EvacuationController) EvacuateRunningActualLRP

func (h *EvacuationController) EvacuateRunningActualLRP(ctx context.Context, logger lager.Logger, actualLRPKey *models.ActualLRPKey, actualLRPInstanceKey *models.ActualLRPInstanceKey, netInfo *models.ActualLRPNetInfo) (bool, error)

    EvacuateRunningActualLRP evacuates the LRP with the given lrp keys. This function has to handle the following cases:

    1. Create a Evacuating LRP if one doesn't already exist and this isn't the Ordinary LRP.

    2. Do the evacuation dance if this is the Ordinary LRP

    3. Remove the evacuating LRP if it is no longer needed (an Ordinary is running or the desired LRP was removed)

    Refer to https://github.com/cloudfoundry/diego-notes/tree/2cbd7451#harmonizing-during-evacuation for more details.

    func (*EvacuationController) EvacuateStoppedActualLRP

    func (h *EvacuationController) EvacuateStoppedActualLRP(ctx context.Context, logger lager.Logger, actualLRPKey *models.ActualLRPKey, actualLRPInstanceKey *models.ActualLRPInstanceKey) error

    func (*EvacuationController) RemoveEvacuatingActualLRP

    func (h *EvacuationController) RemoveEvacuatingActualLRP(ctx context.Context, logger lager.Logger, actualLRPKey *models.ActualLRPKey, actualLRPInstanceKey *models.ActualLRPInstanceKey) error

    type LRPConvergenceController

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

    func NewLRPConvergenceController

    func NewLRPConvergenceController(
    	logger lager.Logger,
    	clock clock.Clock,
    	db db.LRPDB,
    	suspectDB db.SuspectDB,
    	domainDB db.DomainDB,
    	actualHub events.Hub,
    	actualLRPInstanceHub events.Hub,
    	auctioneerClient auctioneer.Client,
    	serviceClient serviceclient.ServiceClient,
    	retirer Retirer,
    	convergenceWorkersSize int,
    	lrpStatMetronNotifier metrics.LRPStatMetronNotifier,
    ) *LRPConvergenceController

    func (*LRPConvergenceController) ConvergeLRPs

    func (h *LRPConvergenceController) ConvergeLRPs(ctx context.Context, logger lager.Logger)

    type Retirer

    type Retirer interface {
    	RetireActualLRP(ctx context.Context, logger lager.Logger, key *models.ActualLRPKey) error
    }

      go:generate counterfeiter -o fakes/fake_retirer.go . Retirer

      type TaskController

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

      func NewTaskController

      func NewTaskController(
      	db db.TaskDB,
      	taskCompletionClient taskworkpool.TaskCompletionClient,
      	auctioneerClient auctioneer.Client,
      	serviceClient serviceclient.ServiceClient,
      	repClientFactory rep.ClientFactory,
      	taskHub events.Hub,
      	taskStatMetronNotifier metrics.TaskStatMetronNotifier,
      	maxRetries int,
      ) *TaskController

      func (*TaskController) CancelTask

      func (c *TaskController) CancelTask(ctx context.Context, logger lager.Logger, taskGUID string) error

      func (*TaskController) CompleteTask

      func (c *TaskController) CompleteTask(
      	ctx context.Context,
      	logger lager.Logger,
      	taskGUID,
      	cellID string,
      	failed bool,
      	failureReason,
      	result string,
      ) error

      func (*TaskController) ConvergeTasks

      func (c *TaskController) ConvergeTasks(
      	ctx context.Context,
      	logger lager.Logger,
      	kickTaskDuration,
      	expirePendingTaskDuration,
      	expireCompletedTaskDuration time.Duration,
      ) error

      func (*TaskController) DeleteTask

      func (c *TaskController) DeleteTask(ctx context.Context, logger lager.Logger, taskGUID string) error

      func (*TaskController) DesireTask

      func (c *TaskController) DesireTask(ctx context.Context, logger lager.Logger, taskDefinition *models.TaskDefinition, taskGUID, domain string) error

      func (*TaskController) FailTask

      func (c *TaskController) FailTask(ctx context.Context, logger lager.Logger, taskGUID, failureReason string) error

      func (*TaskController) RejectTask

      func (c *TaskController) RejectTask(ctx context.Context, logger lager.Logger, taskGUID, rejectionReason string) error

      func (*TaskController) ResolvingTask

      func (c *TaskController) ResolvingTask(ctx context.Context, logger lager.Logger, taskGUID string) error

      func (*TaskController) StartTask

      func (c *TaskController) StartTask(ctx context.Context, logger lager.Logger, taskGUID, cellID string) (shouldStart bool, err error)

      func (*TaskController) TaskByGuid

      func (c *TaskController) TaskByGuid(ctx context.Context, logger lager.Logger, taskGUID string) (*models.Task, error)

      func (*TaskController) Tasks

      func (c *TaskController) Tasks(ctx context.Context, logger lager.Logger, domain, cellID string) ([]*models.Task, error)

      Directories

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