deployments

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	COMPLETE = "complete"
	FAILED   = "failed"
	ETA      = 180
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(httpClient *http.Client, modelsClient *models.Client) *Client

func (*Client) Create

func (c *Client) Create(deployment CreateDeployment) (*Deployment, error)

func (*Client) GetJob

func (c *Client) GetJob(jobID string) (*Job, error)

func (*Client) List

func (c *Client) List() (*DeploymentsResponse, error)

type CreateDeployment

type CreateDeployment struct {
	Name  string                 `json:"name"`
	Args  map[string]interface{} `json:"args"`
	Model string                 `json:"model_id"`
	Sync  bool                   `json:"sync"`
}

type Deployment

type Deployment struct {
	ID      string `json:"id"`
	Job     Job    `json:"job"`
	Status  string `json:"status"`
	Name    string `json:"name"`
	ModelId string `json:"model_id"`
	JobId   string `json:"job_id"`
	Logs    string `json:"logs"`
}

type DeploymentsResponse

type DeploymentsResponse struct {
	Deployments []Deployment `json:"deployments"`
	Total       int          `json:"total"`
}

type Job

type Job struct {
	Id           string   `json:"id"`
	Files        []string `json:"files"`
	CreditsUsed  float32  `json:"credits_used"`
	Status       string   `json:"status"`
	Error        string   `json:"error"`
	DeploymentId string   `json:"deployment_id"`
	Duration     int64    `json:"duration"`
	Logs         string   `json:"logs"`
	Eta          int64    `json:"eta"`
	Etr          int64    `json:"etr"`
}

Jump to

Keyboard shortcuts

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