Documentation ¶
Index ¶
- func RetryPolicy(ctx context.Context, resp *http.Response, err error) (bool, error)
- type CreateSavepointResponse
- type FlinkRestAPI
- type FlinkRestClient
- func (c FlinkRestClient) CreateSavepoint(jobID string, savepointPath string) (CreateSavepointResponse, error)
- func (c FlinkRestClient) MonitorSavepointCreation(jobID string, requestID string) (MonitorSavepointCreationResponse, error)
- func (c FlinkRestClient) RetrieveJobs() ([]Job, error)
- func (c FlinkRestClient) RunJar(jarID string, entryClass string, jarArgs []string, parallelism int, ...) error
- func (c FlinkRestClient) Terminate(jobID string, mode string) error
- func (c FlinkRestClient) UploadJar(filename string) (UploadJarResponse, error)
- type Job
- type MonitorSavepointCreationResponse
- type SavepointCreationStatus
- type TerminateJobErrorResponse
- type UploadJarResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CreateSavepointResponse ¶
type CreateSavepointResponse struct {
RequestID string `json:"request-id"`
}
CreateSavepointResponse represents the response body used by the create savepoint API
type FlinkRestAPI ¶
type FlinkRestAPI interface { Terminate(jobID string, mode string) error CreateSavepoint(jobID string, savepointPath string) (CreateSavepointResponse, error) MonitorSavepointCreation(jobID string, requestID string) (MonitorSavepointCreationResponse, error) RetrieveJobs() ([]Job, error) RunJar(jarID string, entryClass string, jarArgs []string, parallelism int, savepointPath string, allowNonRestoredState bool) error UploadJar(filename string) (UploadJarResponse, error) }
FlinkRestAPI is an interface representing the ability to execute multiple HTTP requests against the Apache Flink API.
type FlinkRestClient ¶
type FlinkRestClient struct { BaseURL string BasicAuthUsername string BasicAuthPassword string Client *retryablehttp.Client }
A FlinkRestClient is a client to interface with the Apache Flink REST API
func (FlinkRestClient) CreateSavepoint ¶
func (c FlinkRestClient) CreateSavepoint(jobID string, savepointPath string) (CreateSavepointResponse, error)
CreateSavepoint creates a savepoint for a job specified by job ID
func (FlinkRestClient) MonitorSavepointCreation ¶
func (c FlinkRestClient) MonitorSavepointCreation(jobID string, requestID string) (MonitorSavepointCreationResponse, error)
MonitorSavepointCreation allows for monitoring the status of a savepoint creation identified by the job ID and request ID
func (FlinkRestClient) RetrieveJobs ¶
func (c FlinkRestClient) RetrieveJobs() ([]Job, error)
RetrieveJobs returns all the jobs on the Flink cluster
func (FlinkRestClient) RunJar ¶
func (c FlinkRestClient) RunJar(jarID string, entryClass string, jarArgs []string, parallelism int, savepointPath string, allowNonRestoredState bool) error
RunJar executes a specific JAR file with the supplied parameters on the Flink cluster
func (FlinkRestClient) Terminate ¶
func (c FlinkRestClient) Terminate(jobID string, mode string) error
Terminate terminates a running job specified by job ID
func (FlinkRestClient) UploadJar ¶
func (c FlinkRestClient) UploadJar(filename string) (UploadJarResponse, error)
UploadJar allows for uploading a JAR file to the Flink cluster
type MonitorSavepointCreationResponse ¶
type MonitorSavepointCreationResponse struct {
Status SavepointCreationStatus `json:"status"`
}
MonitorSavepointCreationResponse represents the response body used by the savepoint monitoring API
type SavepointCreationStatus ¶
type SavepointCreationStatus struct {
Id string `json:"id"`
}
SavepointCreationStatus represents the savepoint creation status used by the API
type TerminateJobErrorResponse ¶
type TerminateJobErrorResponse struct {
ErrInfo string `json:"error"`
}
type UploadJarResponse ¶
UploadJarResponse represents the response body used by the upload JAR API