flinkjob

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlinkJobHandler

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

func NewHandler

func NewHandler(doer doer) FlinkJobHandler

func (*FlinkJobHandler) ServiceFlinkJobDetails

func (h *FlinkJobHandler) ServiceFlinkJobDetails(ctx context.Context, project string, serviceName string, jobId string) (*ServiceFlinkJobDetailsOut, error)

func (*FlinkJobHandler) ServiceFlinkJobsList

func (h *FlinkJobHandler) ServiceFlinkJobsList(ctx context.Context, project string, serviceName string) ([]JobOut, error)

type Handler

type Handler interface {
	// ServiceFlinkJobDetails get a Flink job info
	// GET /project/{project}/service/{service_name}/flink/job/{job_id}
	// https://api.aiven.io/doc/#tag/Service:_Flink/operation/ServiceFlinkJobDetails
	ServiceFlinkJobDetails(ctx context.Context, project string, serviceName string, jobId string) (*ServiceFlinkJobDetailsOut, error)

	// ServiceFlinkJobsList get all Flink jobs
	// GET /project/{project}/service/{service_name}/flink/job
	// https://api.aiven.io/doc/#tag/Service:_Flink/operation/ServiceFlinkJobsList
	ServiceFlinkJobsList(ctx context.Context, project string, serviceName string) ([]JobOut, error)
}

type JobOut

type JobOut struct {
	Id     string `json:"id,omitempty"`
	Status string `json:"status,omitempty"`
}

type ServiceFlinkJobDetailsOut

type ServiceFlinkJobDetailsOut struct {
	Duration       *int             `json:"duration,omitempty"`
	EndTime        *int             `json:"end-time,omitempty"`
	IsStoppable    *bool            `json:"isStoppable,omitempty"`
	Jid            string           `json:"jid,omitempty"`
	MaxParallelism *int             `json:"maxParallelism,omitempty"`
	Name           string           `json:"name,omitempty"`
	Now            *int             `json:"now,omitempty"`
	Plan           map[string]any   `json:"plan,omitempty"`
	StartTime      *int             `json:"start-time,omitempty"`
	State          string           `json:"state,omitempty"`
	StatusCounts   *StatusCountsOut `json:"status-counts,omitempty"`
	Timestamps     map[string]any   `json:"timestamps,omitempty"`
	Vertices       []map[string]any `json:"vertices,omitempty"`
}

type StatusCountsOut

type StatusCountsOut struct {
	Canceled     *int `json:"CANCELED,omitempty"`
	Canceling    *int `json:"CANCELING,omitempty"`
	Created      *int `json:"CREATED,omitempty"`
	Deploying    *int `json:"DEPLOYING,omitempty"`
	Failed       *int `json:"FAILED,omitempty"`
	Finished     *int `json:"FINISHED,omitempty"`
	Initializing *int `json:"INITIALIZING,omitempty"`
	Reconciling  *int `json:"RECONCILING,omitempty"`
	Running      *int `json:"RUNNING,omitempty"`
	Scheduled    *int `json:"SCHEDULED,omitempty"`
}

Jump to

Keyboard shortcuts

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