operations

package
v0.0.0-...-bfdfb66 Latest Latest
Warning

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

Go to latest
Published: May 28, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deploy

type Deploy struct {
	RemoteFilename        string
	APIToken              string
	LocalFilename         string
	EntryClass            string
	Parallelism           int
	ProgramArgs           []string
	SavepointDir          string
	SavepointPath         string
	AllowNonRestoredState bool
}

Deploy represents the configuration used for deploying a job to the Flink cluster

type Operator

type Operator interface {
	Deploy(d Deploy) error
	Update(u UpdateJob) error
	RetrieveJobs() ([]flink.Job, error)
	Terminate(t TerminateJob) error
}

Operator is an interface which contains all the functionality that the deployer exposes

type RealOperator

type RealOperator struct {
	Filesystem   afero.Fs
	FlinkRestAPI flink.FlinkRestAPI
}

RealOperator is the Operator used in the production code

func (RealOperator) Deploy

func (o RealOperator) Deploy(d Deploy) error

Deploy executes the actual deployment to the Flink cluster

func (RealOperator) RetrieveJobs

func (o RealOperator) RetrieveJobs() ([]flink.Job, error)

RetrieveJobs executes the logic required for retrieving the jobs from a Flink cluster

func (RealOperator) Terminate

func (o RealOperator) Terminate(t TerminateJob) error

Terminate executes the actual termination of a job on the Flink cluster

func (RealOperator) Update

func (o RealOperator) Update(u UpdateJob) error

Update executes the actual update of a job on the Flink cluster

type TerminateJob

type TerminateJob struct {
	JobNameBase string
	Mode        string
}

TerminateJob represents the configuration used for terminate a job on the Flink cluster

type UpdateJob

type UpdateJob struct {
	JobNameBase           string
	LocalFilename         string
	RemoteFilename        string
	APIToken              string
	EntryClass            string
	Parallelism           int
	ProgramArgs           []string
	SavepointDir          string
	AllowNonRestoredState bool
	Deploy                bool
	MaxSavepointDuration  int
}

UpdateJob represents the configuration used for updating a job on the Flink cluster

Jump to

Keyboard shortcuts

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