dashboardclient

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: Apache-2.0, BSD-2-Clause, MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Multi-application URL paths
	ServeDetailsPath = "/api/serve/applications/"
	APITypeParam     = "declarative"
	DeployPathV2     = "/api/serve/applications/"
	// Job URL paths
	JobPath = "/api/jobs/"
)

Functions

func ConvertRayJobToReq

func ConvertRayJobToReq(rayJob *rayv1.RayJob) (*utiltypes.RayJobRequest, error)

func UnmarshalRuntimeEnvYAML

func UnmarshalRuntimeEnvYAML(runtimeEnvYAML string) (utiltypes.RuntimeEnvType, error)

Types

type RayDashboardClient

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

func (*RayDashboardClient) ConvertServeDetailsToApplicationStatuses

func (r *RayDashboardClient) ConvertServeDetailsToApplicationStatuses(serveDetails *utiltypes.ServeDetails) (map[string]*utiltypes.ServeApplicationStatus, error)

func (*RayDashboardClient) DeleteJob

func (r *RayDashboardClient) DeleteJob(ctx context.Context, jobName string) error

func (*RayDashboardClient) GetJobInfo

func (r *RayDashboardClient) GetJobInfo(ctx context.Context, jobId string) (*utiltypes.RayJobInfo, error)

Note that RayJobInfo and error can't be nil at the same time. Please make sure if the Ray job with JobId can't be found. Return a BadRequest error.

func (*RayDashboardClient) GetJobLog

func (r *RayDashboardClient) GetJobLog(ctx context.Context, jobName string) (*string, error)

Get Job Log

func (*RayDashboardClient) GetMultiApplicationStatus

func (r *RayDashboardClient) GetMultiApplicationStatus(ctx context.Context) (map[string]*utiltypes.ServeApplicationStatus, error)

func (*RayDashboardClient) GetServeDetails

func (r *RayDashboardClient) GetServeDetails(ctx context.Context) (*utiltypes.ServeDetails, error)

GetServeDetails gets details on all declarative applications on the Ray cluster.

func (*RayDashboardClient) InitClient

func (r *RayDashboardClient) InitClient(client *http.Client, dashboardURL string, authToken string)

func (*RayDashboardClient) ListJobs

func (*RayDashboardClient) StopJob

func (r *RayDashboardClient) StopJob(ctx context.Context, jobName string) (err error)

func (*RayDashboardClient) SubmitJob

func (r *RayDashboardClient) SubmitJob(ctx context.Context, rayJob *rayv1.RayJob) (jobId string, err error)

func (*RayDashboardClient) SubmitJobReq

func (r *RayDashboardClient) SubmitJobReq(ctx context.Context, request *utiltypes.RayJobRequest) (jobId string, err error)

func (*RayDashboardClient) UpdateDeployments

func (r *RayDashboardClient) UpdateDeployments(ctx context.Context, configJson []byte) error

UpdateDeployments update the deployments in the Ray cluster.

type RayDashboardClientInterface

type RayDashboardClientInterface interface {
	InitClient(client *http.Client, dashboardURL string, authToken string)
	UpdateDeployments(ctx context.Context, configJson []byte) error
	// V2/multi-app Rest API
	GetServeDetails(ctx context.Context) (*utiltypes.ServeDetails, error)
	GetMultiApplicationStatus(context.Context) (map[string]*utiltypes.ServeApplicationStatus, error)
	GetJobInfo(ctx context.Context, jobId string) (*utiltypes.RayJobInfo, error)
	ListJobs(ctx context.Context) (*[]utiltypes.RayJobInfo, error)
	SubmitJob(ctx context.Context, rayJob *rayv1.RayJob) (string, error)
	SubmitJobReq(ctx context.Context, request *utiltypes.RayJobRequest) (string, error)
	GetJobLog(ctx context.Context, jobName string) (*string, error)
	StopJob(ctx context.Context, jobName string) error
	DeleteJob(ctx context.Context, jobName string) error
}

Jump to

Keyboard shortcuts

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