flinkjob

package
v0.73.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JobStatusTypeChoices added in v0.3.0

func JobStatusTypeChoices() []string

func ServiceFlinkJobDetailsStateTypeChoices added in v0.3.0

func ServiceFlinkJobDetailsStateTypeChoices() []string

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 /v1/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 /v1/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"`     // Job ID
	Status JobStatusType `json:"status,omitempty"` // Job status
}

type JobStatusType added in v0.3.0

type JobStatusType string
const (
	JobStatusTypeInitializing JobStatusType = "INITIALIZING"
	JobStatusTypeCreated      JobStatusType = "CREATED"
	JobStatusTypeRunning      JobStatusType = "RUNNING"
	JobStatusTypeFailing      JobStatusType = "FAILING"
	JobStatusTypeFailed       JobStatusType = "FAILED"
	JobStatusTypeCancelling   JobStatusType = "CANCELLING"
	JobStatusTypeCanceled     JobStatusType = "CANCELED"
	JobStatusTypeFinished     JobStatusType = "FINISHED"
	JobStatusTypeRestarting   JobStatusType = "RESTARTING"
	JobStatusTypeSuspended    JobStatusType = "SUSPENDED"
	JobStatusTypeReconciling  JobStatusType = "RECONCILING"
)

type ServiceFlinkJobDetailsOut

type ServiceFlinkJobDetailsOut struct {
	Duration       *int                            `json:"duration,omitempty"`       // Duration of the job
	EndTime        *int                            `json:"end-time,omitempty"`       // End time of the job
	IsStoppable    *bool                           `json:"isStoppable,omitempty"`    // Whether the job is stoppable
	Jid            *string                         `json:"jid,omitempty"`            // Job ID
	MaxParallelism *int                            `json:"maxParallelism,omitempty"` // Max parallelism
	Name           *string                         `json:"name,omitempty"`           // Job name
	Now            *int                            `json:"now,omitempty"`            // Epoch time
	Plan           map[string]any                  `json:"plan,omitempty"`
	StartTime      *int                            `json:"start-time,omitempty"`    // Start time epoch
	State          ServiceFlinkJobDetailsStateType `json:"state,omitempty"`         // Job state
	StatusCounts   *StatusCountsOut                `json:"status-counts,omitempty"` // Status counts
	Timestamps     map[string]any                  `json:"timestamps,omitempty"`
	Vertices       []map[string]any                `json:"vertices,omitempty"`
}

ServiceFlinkJobDetailsOut ServiceFlinkJobDetailsResponse

type ServiceFlinkJobDetailsStateType added in v0.3.0

type ServiceFlinkJobDetailsStateType string
const (
	ServiceFlinkJobDetailsStateTypeInitializing ServiceFlinkJobDetailsStateType = "INITIALIZING"
	ServiceFlinkJobDetailsStateTypeCreated      ServiceFlinkJobDetailsStateType = "CREATED"
	ServiceFlinkJobDetailsStateTypeRunning      ServiceFlinkJobDetailsStateType = "RUNNING"
	ServiceFlinkJobDetailsStateTypeFailing      ServiceFlinkJobDetailsStateType = "FAILING"
	ServiceFlinkJobDetailsStateTypeFailed       ServiceFlinkJobDetailsStateType = "FAILED"
	ServiceFlinkJobDetailsStateTypeCancelling   ServiceFlinkJobDetailsStateType = "CANCELLING"
	ServiceFlinkJobDetailsStateTypeCanceled     ServiceFlinkJobDetailsStateType = "CANCELED"
	ServiceFlinkJobDetailsStateTypeFinished     ServiceFlinkJobDetailsStateType = "FINISHED"
	ServiceFlinkJobDetailsStateTypeRestarting   ServiceFlinkJobDetailsStateType = "RESTARTING"
	ServiceFlinkJobDetailsStateTypeSuspended    ServiceFlinkJobDetailsStateType = "SUSPENDED"
	ServiceFlinkJobDetailsStateTypeReconciling  ServiceFlinkJobDetailsStateType = "RECONCILING"
)

type StatusCountsOut

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

StatusCountsOut Status counts

Jump to

Keyboard shortcuts

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