mock

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelWithSavepointFunc

type CancelWithSavepointFunc func(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (string, error)

type CompareAndUpdateClusterStatusFunc

type CompareAndUpdateClusterStatusFunc func(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (bool, error)

type CompareAndUpdateJobStatusFunc

type CompareAndUpdateJobStatusFunc func(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (bool, error)

type CreateClusterFunc

type CreateClusterFunc func(ctx context.Context, application *v1beta1.FlinkApplication) error

type CreateIfNotExistFunc

type CreateIfNotExistFunc func(ctx context.Context, application *v1beta1.FlinkApplication) (bool, error)

type DeleteOldResourcesForApp added in v0.1.2

type DeleteOldResourcesForApp func(ctx context.Context, application *v1beta1.FlinkApplication) error

type FindExternalizedCheckpointFunc

type FindExternalizedCheckpointFunc func(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (string, error)

type FlinkController

type FlinkController struct {
	CreateClusterFunc                 CreateClusterFunc
	DeleteOldResourcesForAppFunc      DeleteOldResourcesForApp
	CancelWithSavepointFunc           CancelWithSavepointFunc
	ForceCancelFunc                   ForceCancelFunc
	StartFlinkJobFunc                 StartFlinkJobFunc
	GetSavepointStatusFunc            GetSavepointStatusFunc
	IsClusterReadyFunc                IsClusterReadyFunc
	IsServiceReadyFunc                IsServiceReadyFunc
	GetJobsForApplicationFunc         GetJobsForApplicationFunc
	GetCurrentDeploymentsForAppFunc   GetCurrentDeploymentsForAppFunc
	FindExternalizedCheckpointFunc    FindExternalizedCheckpointFunc
	Events                            []corev1.Event
	CompareAndUpdateClusterStatusFunc CompareAndUpdateClusterStatusFunc
	CompareAndUpdateJobStatusFunc     CompareAndUpdateJobStatusFunc
}

func (*FlinkController) CancelWithSavepoint

func (m *FlinkController) CancelWithSavepoint(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (string, error)

func (*FlinkController) CompareAndUpdateClusterStatus

func (m *FlinkController) CompareAndUpdateClusterStatus(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (bool, error)

func (*FlinkController) CompareAndUpdateJobStatus

func (m *FlinkController) CompareAndUpdateJobStatus(ctx context.Context, app *v1beta1.FlinkApplication, hash string) (bool, error)

func (*FlinkController) CreateCluster

func (m *FlinkController) CreateCluster(ctx context.Context, application *v1beta1.FlinkApplication) error

func (*FlinkController) DeleteOldResourcesForApp added in v0.1.2

func (m *FlinkController) DeleteOldResourcesForApp(ctx context.Context, application *v1beta1.FlinkApplication) error

func (*FlinkController) FindExternalizedCheckpoint

func (m *FlinkController) FindExternalizedCheckpoint(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (string, error)

func (*FlinkController) ForceCancel

func (m *FlinkController) ForceCancel(ctx context.Context, application *v1beta1.FlinkApplication, hash string) error

func (*FlinkController) GetCurrentDeploymentsForApp added in v0.1.2

func (m *FlinkController) GetCurrentDeploymentsForApp(ctx context.Context, application *v1beta1.FlinkApplication) (*common.FlinkDeployment, error)

func (*FlinkController) GetJobsForApplication

func (m *FlinkController) GetJobsForApplication(ctx context.Context, application *v1beta1.FlinkApplication, hash string) ([]client.FlinkJob, error)

func (*FlinkController) GetSavepointStatus

func (m *FlinkController) GetSavepointStatus(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (*client.SavepointResponse, error)

func (*FlinkController) IsClusterReady

func (m *FlinkController) IsClusterReady(ctx context.Context, application *v1beta1.FlinkApplication) (bool, error)

func (*FlinkController) IsServiceReady

func (m *FlinkController) IsServiceReady(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (bool, error)

func (*FlinkController) LogEvent

func (m *FlinkController) LogEvent(ctx context.Context, app *v1beta1.FlinkApplication, eventType string, reason string, message string)

func (*FlinkController) StartFlinkJob

func (m *FlinkController) StartFlinkJob(ctx context.Context, application *v1beta1.FlinkApplication, hash string,
	jarName string, parallelism int32, entryClass string, programArgs string, allowNonRestoredState bool) (string, error)

type ForceCancelFunc

type ForceCancelFunc func(ctx context.Context, application *v1beta1.FlinkApplication, hash string) error

type GetCurrentDeploymentsForAppFunc added in v0.1.2

type GetCurrentDeploymentsForAppFunc func(ctx context.Context, application *v1beta1.FlinkApplication) (*common.FlinkDeployment, error)

type GetJobsForApplicationFunc

type GetJobsForApplicationFunc func(ctx context.Context, application *v1beta1.FlinkApplication, hash string) ([]client.FlinkJob, error)

type GetRetryDelayFunc added in v0.1.3

type GetRetryDelayFunc func(retryCount int32) time.Duration

type GetSavepointStatusFunc

type GetSavepointStatusFunc func(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (*client.SavepointResponse, error)

type IsClusterReadyFunc

type IsClusterReadyFunc func(ctx context.Context, application *v1beta1.FlinkApplication) (bool, error)

type IsErrorFailFastFunc added in v0.1.3

type IsErrorFailFastFunc func(err error) bool

type IsErrorRetryableFunc added in v0.1.3

type IsErrorRetryableFunc func(err error) bool

type IsRetryRemainingFunc added in v0.1.3

type IsRetryRemainingFunc func(err error, retryCount int32) bool

type IsServiceReadyFunc

type IsServiceReadyFunc func(ctx context.Context, application *v1beta1.FlinkApplication, hash string) (bool, error)

type IsTimeToRetryFunc added in v0.1.3

type IsTimeToRetryFunc func(clock clock.Clock, lastUpdatedTime time.Time, retryCount int32) bool

type JobManagerController

type JobManagerController struct {
	CreateIfNotExistFunc CreateIfNotExistFunc
}

func (*JobManagerController) CreateIfNotExist

func (m *JobManagerController) CreateIfNotExist(
	ctx context.Context,
	application *v1beta1.FlinkApplication) (bool, error)

type RetryHandler added in v0.1.3

type RetryHandler struct {
	IsErrorRetryableFunc IsErrorRetryableFunc
	IsRetryRemainingFunc IsRetryRemainingFunc
	IsErrorFailFastFunc  IsErrorFailFastFunc
	WaitOnErrorFunc      WaitOnErrorFunc
	GetRetryDelayFunc    GetRetryDelayFunc
	IsTimeToRetryFunc    IsTimeToRetryFunc
}

func (RetryHandler) GetRetryDelay added in v0.1.3

func (e RetryHandler) GetRetryDelay(retryCount int32) time.Duration

func (RetryHandler) IsErrorFailFast added in v0.1.3

func (e RetryHandler) IsErrorFailFast(err error) bool

func (RetryHandler) IsErrorRetryable added in v0.1.3

func (e RetryHandler) IsErrorRetryable(err error) bool

func (RetryHandler) IsRetryRemaining added in v0.1.3

func (e RetryHandler) IsRetryRemaining(err error, retryCount int32) bool

func (RetryHandler) IsTimeToRetry added in v0.1.3

func (e RetryHandler) IsTimeToRetry(clock clock.Clock, lastUpdatedTime time.Time, retryCount int32) bool

func (RetryHandler) WaitOnError added in v0.1.3

func (e RetryHandler) WaitOnError(clock clock.Clock, lastUpdatedTime time.Time) (time.Duration, bool)

type StartFlinkJobFunc

type StartFlinkJobFunc func(ctx context.Context, application *v1beta1.FlinkApplication, hash string,
	jarName string, parallelism int32, entryClass string, programArgs string, allowNonRestoredState bool) (string, error)

type TaskManagerController

type TaskManagerController struct {
	CreateIfNotExistFunc CreateIfNotExistFunc
}

func (*TaskManagerController) CreateIfNotExist

func (m *TaskManagerController) CreateIfNotExist(
	ctx context.Context, application *v1beta1.FlinkApplication) (bool, error)

type WaitOnErrorFunc added in v0.1.3

type WaitOnErrorFunc func(clock clock.Clock, lastUpdatedTime time.Time) (time.Duration, bool)

Jump to

Keyboard shortcuts

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