Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDomainMissing = errors.New("domain missing from request")
	ErrMaxAgeMissing = errors.New("max-age directive missing from request")
)

Functions

func New

func New(
	logger,
	accessLogger lager.Logger,
	updateWorkers int,
	convergenceWorkersSize int,
	maxTaskPlacementRetries int,
	emitter middleware.Emitter,
	db db.DB,
	desiredHub, actualHub, actualLRPInstanceHub, taskHub events.Hub,
	taskCompletionClient taskworkpool.TaskCompletionClient,
	serviceClient serviceclient.ServiceClient,
	auctioneerClient auctioneer.Client,
	repClientFactory rep.ClientFactory,
	taskStatMetronNotifier metrics.TaskStatMetronNotifier,
	migrationsDone <-chan struct{},
	exitChan chan struct{},
) http.Handler

func UnavailableWrap

func UnavailableWrap(handler http.Handler, serviceReady <-chan struct{}) http.HandlerFunc

Types

type ActualLRPHandler

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

func NewActualLRPHandler

func NewActualLRPHandler(db db.ActualLRPDB, exitChan chan<- struct{}) *ActualLRPHandler

func (*ActualLRPHandler) ActualLRPGroupByProcessGuidAndIndex

func (h *ActualLRPHandler) ActualLRPGroupByProcessGuidAndIndex(logger lager.Logger, w http.ResponseWriter, req *http.Request)

    DEPRECATED

    func (*ActualLRPHandler) ActualLRPGroups

    func (h *ActualLRPHandler) ActualLRPGroups(logger lager.Logger, w http.ResponseWriter, req *http.Request)

      DEPRECATED

      func (*ActualLRPHandler) ActualLRPGroupsByProcessGuid

      func (h *ActualLRPHandler) ActualLRPGroupsByProcessGuid(logger lager.Logger, w http.ResponseWriter, req *http.Request)

        DEPRECATED

        func (*ActualLRPHandler) ActualLRPs

        func (h *ActualLRPHandler) ActualLRPs(logger lager.Logger, w http.ResponseWriter, req *http.Request)

        type ActualLRPLifecycleController

        type ActualLRPLifecycleController interface {
        	ClaimActualLRP(ctx context.Context, logger lager.Logger, processGuid string, index int32, actualLRPInstanceKey *models.ActualLRPInstanceKey) error
        	StartActualLRP(ctx context.Context, logger lager.Logger, actualLRPKey *models.ActualLRPKey, actualLRPInstanceKey *models.ActualLRPInstanceKey, actualLRPNetInfo *models.ActualLRPNetInfo) error
        	CrashActualLRP(ctx context.Context, logger lager.Logger, actualLRPKey *models.ActualLRPKey, actualLRPInstanceKey *models.ActualLRPInstanceKey, errorMessage string) error
        	FailActualLRP(ctx context.Context, logger lager.Logger, key *models.ActualLRPKey, errorMessage string) error
        	RemoveActualLRP(ctx context.Context, logger lager.Logger, processGuid string, index int32, instanceKey *models.ActualLRPInstanceKey) error
        	RetireActualLRP(ctx context.Context, logger lager.Logger, key *models.ActualLRPKey) error
        }

          go:generate counterfeiter -o fake_controllers/fake_actual_lrp_lifecycle_controller.go . ActualLRPLifecycleController

          type ActualLRPLifecycleHandler

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

          func NewActualLRPLifecycleHandler

          func NewActualLRPLifecycleHandler(
          	controller ActualLRPLifecycleController,
          	exitChan chan<- struct{},
          ) *ActualLRPLifecycleHandler

          func (*ActualLRPLifecycleHandler) ClaimActualLRP

          func (h *ActualLRPLifecycleHandler) ClaimActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*ActualLRPLifecycleHandler) CrashActualLRP

          func (h *ActualLRPLifecycleHandler) CrashActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*ActualLRPLifecycleHandler) FailActualLRP

          func (h *ActualLRPLifecycleHandler) FailActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*ActualLRPLifecycleHandler) RemoveActualLRP

          func (h *ActualLRPLifecycleHandler) RemoveActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*ActualLRPLifecycleHandler) RetireActualLRP

          func (h *ActualLRPLifecycleHandler) RetireActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*ActualLRPLifecycleHandler) StartActualLRP

          func (h *ActualLRPLifecycleHandler) StartActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          type CellHandler

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

          func NewCellHandler

          func NewCellHandler(serviceClient serviceclient.ServiceClient, exitChan chan<- struct{}) *CellHandler

          func (*CellHandler) Cells

          func (h *CellHandler) Cells(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          type DesiredLRPHandler

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

          func NewDesiredLRPHandler

          func NewDesiredLRPHandler(
          	updateWorkersCount int,
          	desiredLRPDB db.DesiredLRPDB,
          	actualLRPDB db.ActualLRPDB,
          	desiredHub events.Hub,
          	actualHub events.Hub,
          	actualLRPInstanceHub events.Hub,
          	auctioneerClient auctioneer.Client,
          	repClientFactory rep.ClientFactory,
          	serviceClient serviceclient.ServiceClient,
          	exitChan chan<- struct{},
          ) *DesiredLRPHandler

          func (*DesiredLRPHandler) DesireDesiredLRP

          func (h *DesiredLRPHandler) DesireDesiredLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*DesiredLRPHandler) DesiredLRPByProcessGuid

          func (h *DesiredLRPHandler) DesiredLRPByProcessGuid(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*DesiredLRPHandler) DesiredLRPByProcessGuid_r2

          func (h *DesiredLRPHandler) DesiredLRPByProcessGuid_r2(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*DesiredLRPHandler) DesiredLRPSchedulingInfos

          func (h *DesiredLRPHandler) DesiredLRPSchedulingInfos(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*DesiredLRPHandler) DesiredLRPs

          func (h *DesiredLRPHandler) DesiredLRPs(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*DesiredLRPHandler) DesiredLRPs_r2

          func (h *DesiredLRPHandler) DesiredLRPs_r2(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*DesiredLRPHandler) RemoveDesiredLRP

          func (h *DesiredLRPHandler) RemoveDesiredLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*DesiredLRPHandler) UpdateDesiredLRP

          func (h *DesiredLRPHandler) UpdateDesiredLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          type DomainHandler

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

          func NewDomainHandler

          func NewDomainHandler(db db.DomainDB, exitChan chan<- struct{}) *DomainHandler

          func (*DomainHandler) Domains

          func (h *DomainHandler) Domains(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          func (*DomainHandler) Upsert

          func (h *DomainHandler) Upsert(logger lager.Logger, w http.ResponseWriter, req *http.Request)

          type EvacuationController

            go:generate counterfeiter -o fake_controllers/fake_evacuation_controller.go . EvacuationController

            type EvacuationHandler

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

            func NewEvacuationHandler

            func NewEvacuationHandler(
            	controller EvacuationController,
            	exitChan chan<- struct{},
            ) *EvacuationHandler

            func (*EvacuationHandler) EvacuateClaimedActualLRP

            func (h *EvacuationHandler) EvacuateClaimedActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

            func (*EvacuationHandler) EvacuateCrashedActualLRP

            func (h *EvacuationHandler) EvacuateCrashedActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

            func (*EvacuationHandler) EvacuateRunningActualLRP

            func (h *EvacuationHandler) EvacuateRunningActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

            func (*EvacuationHandler) EvacuateStoppedActualLRP

            func (h *EvacuationHandler) EvacuateStoppedActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

            func (*EvacuationHandler) RemoveEvacuatingActualLRP

            func (h *EvacuationHandler) RemoveEvacuatingActualLRP(logger lager.Logger, w http.ResponseWriter, req *http.Request)

            type EventController

            type EventController interface {
            	Subscribe_r0(logger lager.Logger, w http.ResponseWriter, req *http.Request)
            	Subscribe_r1(logger lager.Logger, w http.ResponseWriter, req *http.Request)
            }

            type EventFetcher

            type EventFetcher func() (models.Event, error)

            type LRPGroupEventsHandler

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

              DEPRECATED

              func NewLRPGroupEventsHandler

              func NewLRPGroupEventsHandler(desiredHub, actualHub events.Hub) *LRPGroupEventsHandler

                DEPRECATED

                func (*LRPGroupEventsHandler) Subscribe_r0

                func (h *LRPGroupEventsHandler) Subscribe_r0(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*LRPGroupEventsHandler) Subscribe_r1

                func (h *LRPGroupEventsHandler) Subscribe_r1(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                type LRPInstanceEventHandler

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

                func NewLRPInstanceEventHandler

                func NewLRPInstanceEventHandler(desiredHub, lrpInstanceHub events.Hub) *LRPInstanceEventHandler

                func (*LRPInstanceEventHandler) Subscribe_r0

                func (h *LRPInstanceEventHandler) Subscribe_r0(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*LRPInstanceEventHandler) Subscribe_r1

                func (h *LRPInstanceEventHandler) Subscribe_r1(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                type MessageValidator

                type MessageValidator interface {
                	proto.Message
                	Validate() error
                	Unmarshal(data []byte) error
                }

                type PingHandler

                type PingHandler struct {
                }

                func NewPingHandler

                func NewPingHandler() *PingHandler

                func (*PingHandler) Ping

                func (h *PingHandler) Ping(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                type TaskController

                type TaskController interface {
                	Tasks(ctx context.Context, logger lager.Logger, domain, cellId string) ([]*models.Task, error)
                	TaskByGuid(ctx context.Context, logger lager.Logger, taskGuid string) (*models.Task, error)
                	DesireTask(ctx context.Context, logger lager.Logger, taskDefinition *models.TaskDefinition, taskGuid, domain string) error
                	StartTask(ctx context.Context, logger lager.Logger, taskGuid, cellId string) (shouldStart bool, err error)
                	CancelTask(ctx context.Context, logger lager.Logger, taskGuid string) error
                	FailTask(ctx context.Context, logger lager.Logger, taskGuid, failureReason string) error
                	RejectTask(ctx context.Context, logger lager.Logger, taskGuid, failureReason string) error
                	CompleteTask(ctx context.Context, logger lager.Logger, taskGuid, cellId string, failed bool, failureReason, result string) error
                	ResolvingTask(ctx context.Context, logger lager.Logger, taskGuid string) error
                	DeleteTask(ctx context.Context, logger lager.Logger, taskGuid string) error
                	ConvergeTasks(ctx context.Context, logger lager.Logger, kickTaskDuration, expirePendingTaskDuration, expireCompletedTaskDuration time.Duration) error
                }

                type TaskEventHandler

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

                func NewTaskEventHandler

                func NewTaskEventHandler(taskHub events.Hub) *TaskEventHandler

                func (*TaskEventHandler) Subscribe_r0

                func (h *TaskEventHandler) Subscribe_r0(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskEventHandler) Subscribe_r1

                func (h *TaskEventHandler) Subscribe_r1(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                type TaskHandler

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

                func NewTaskHandler

                func NewTaskHandler(
                	controller TaskController,
                	exitChan chan<- struct{},
                ) *TaskHandler

                func (*TaskHandler) CancelTask

                func (h *TaskHandler) CancelTask(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) CompleteTask

                func (h *TaskHandler) CompleteTask(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) DeleteTask

                func (h *TaskHandler) DeleteTask(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) DesireTask

                func (h *TaskHandler) DesireTask(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) FailTask

                func (h *TaskHandler) FailTask(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) RejectTask

                func (h *TaskHandler) RejectTask(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) ResolvingTask

                func (h *TaskHandler) ResolvingTask(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) StartTask

                func (h *TaskHandler) StartTask(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) TaskByGuid

                func (h *TaskHandler) TaskByGuid(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) TaskByGuid_r2

                func (h *TaskHandler) TaskByGuid_r2(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) Tasks

                func (h *TaskHandler) Tasks(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                func (*TaskHandler) Tasks_r2

                func (h *TaskHandler) Tasks_r2(logger lager.Logger, w http.ResponseWriter, req *http.Request)

                type UnavailableHandler

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

                func NewUnavailableHandler

                func NewUnavailableHandler(handler http.Handler, serviceReadyChan <-chan struct{}) *UnavailableHandler

                func (*UnavailableHandler) ServeHTTP

                func (u *UnavailableHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

                Directories

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