bulk

package
v0.0.0-...-45400c2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: Apache-2.0 Imports: 23 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppDiffer

type AppDiffer interface {
	Diff(logger lager.Logger, cancel <-chan struct{}, fingerprints <-chan []cc_messages.CCDesiredAppFingerprint) <-chan error

	Stale() <-chan []cc_messages.CCDesiredAppFingerprint

	Missing() <-chan []cc_messages.CCDesiredAppFingerprint

	Deleted() <-chan []string
}

func NewAppDiffer

func NewAppDiffer(existing map[string]*models.DesiredLRPSchedulingInfo) AppDiffer

type CCFetcher

type CCFetcher struct {
	BaseURI   string
	BatchSize int
	Username  string
	Password  string
}

func (*CCFetcher) FetchDesiredApps

func (fetcher *CCFetcher) FetchDesiredApps(
	logger lager.Logger,
	cancel <-chan struct{},
	httpClient *http.Client,
	fingerprintCh <-chan []cc_messages.CCDesiredAppFingerprint,
) (<-chan []cc_messages.DesireAppRequestFromCC, <-chan error)

func (*CCFetcher) FetchFingerprints

func (fetcher *CCFetcher) FetchFingerprints(
	logger lager.Logger,
	cancel <-chan struct{},
	httpClient *http.Client,
) (<-chan []cc_messages.CCDesiredAppFingerprint, <-chan error)

func (*CCFetcher) FetchTaskStates

func (fetcher *CCFetcher) FetchTaskStates(
	logger lager.Logger,
	cancel <-chan struct{},
	httpClient *http.Client,
) (<-chan []cc_messages.CCTaskState, <-chan error)

type CCTaskClient

type CCTaskClient struct {
}

func (*CCTaskClient) FailTask

func (tc *CCTaskClient) FailTask(logger lager.Logger, taskState *cc_messages.CCTaskState, httpClient *http.Client) error

type Fetcher

type Fetcher interface {
	FetchFingerprints(
		logger lager.Logger,
		cancel <-chan struct{},
		httpClient *http.Client,
	) (<-chan []cc_messages.CCDesiredAppFingerprint, <-chan error)

	FetchTaskStates(
		logger lager.Logger,
		cancel <-chan struct{},
		httpClient *http.Client,
	) (<-chan []cc_messages.CCTaskState, <-chan error)

	FetchDesiredApps(
		logger lager.Logger,
		cancel <-chan struct{},
		httpClient *http.Client,
		fingerprints <-chan []cc_messages.CCDesiredAppFingerprint,
	) (<-chan []cc_messages.DesireAppRequestFromCC, <-chan error)
}

type LRPProcessor

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

func NewLRPProcessor

func NewLRPProcessor(
	logger lager.Logger,
	bbsClient bbs.Client,
	pollingInterval time.Duration,
	domainTTL time.Duration,
	bulkBatchSize uint,
	updateLRPWorkPoolSize int,
	skipCertVerify bool,
	fetcher Fetcher,
	builders map[string]recipebuilder.RecipeBuilder,
	clock clock.Clock,
) *LRPProcessor

func (*LRPProcessor) Run

func (l *LRPProcessor) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type TaskClient

type TaskClient interface {
	FailTask(logger lager.Logger, taskState *cc_messages.CCTaskState, httpClient *http.Client) error
}

type TaskDiffer

type TaskDiffer interface {
	Diff(lager.Logger, <-chan []cc_messages.CCTaskState, <-chan struct{})
	TasksToFail() <-chan []cc_messages.CCTaskState
	TasksToCancel() <-chan []string
}

func NewTaskDiffer

func NewTaskDiffer(bbsTasks map[string]*models.Task) TaskDiffer

type TaskProcessor

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

func NewTaskProcessor

func NewTaskProcessor(
	logger lager.Logger,
	bbsClient bbs.Client,
	taskClient TaskClient,
	pollingInterval time.Duration,
	domainTTL time.Duration,
	failTaskPoolSize int,
	cancelTaskPoolSize int,
	skipCertVerify bool,
	fetcher Fetcher,
	clock clock.Clock) *TaskProcessor

func (*TaskProcessor) Run

func (t *TaskProcessor) Run(signals <-chan os.Signal, ready chan<- struct{}) error

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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