Documentation
¶
Index ¶
- type EngineStatus
- type P
- func (p *P) AddOrUpdateEngineStatus(srv engineCommunicator, engineStatus *v1.EngineStatus, ...)
- func (p *P) DumpStatus() *Status
- func (p *P) MaxInProgressTaskDuration() time.Duration
- func (p *P) NumEnginesByTenantID() map[string]int
- func (p *P) NumInProgressTasks() int
- func (p *P) NumQueuedTasks() int32
- func (p *P) ProcessTaskResult(taskResult *v1.TaskResult, clusterInfo *auth.ClusterInfo) error
- func (p *P) RemoveEngine(engineID string, clusterInfo *auth.ClusterInfo)
- func (p *P) Run(ctx context.Context) error
- type Status
- type Task
- type TaskQueue
- type TaskStatus
- type TenantStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EngineStatus ¶ added in v0.215.0
type EngineStatus struct { RegisteredModelIDs []string `json:"registeredModelIds"` InProgressModelIDs []string `json:"inProgressModelIds"` Tasks []*TaskStatus `json:"tasks"` }
EngineStatus is the status of an engine.
type P ¶
type P struct {
// contains filtered or unexported fields
}
P processes inference tasks.
func (*P) AddOrUpdateEngineStatus ¶ added in v0.115.0
func (p *P) AddOrUpdateEngineStatus( srv engineCommunicator, engineStatus *v1.EngineStatus, clusterInfo *auth.ClusterInfo, )
AddOrUpdateEngineStatus adds or updates the engine status.
func (*P) DumpStatus ¶ added in v0.215.0
DumpStatus dumps the status of the processor.
func (*P) MaxInProgressTaskDuration ¶ added in v0.163.0
MaxInProgressTaskDuration returns the maximum duration of in-progress tasks.
func (*P) NumEnginesByTenantID ¶ added in v0.167.0
NumEnginesByTenantID returns the number of engines by tenant ID.
func (*P) NumInProgressTasks ¶ added in v0.163.0
NumInProgressTasks returns the number of in-progress tasks.
func (*P) NumQueuedTasks ¶ added in v0.163.0
NumQueuedTasks returns the number of queued tasks.
func (*P) ProcessTaskResult ¶ added in v0.121.0
func (p *P) ProcessTaskResult( taskResult *v1.TaskResult, clusterInfo *auth.ClusterInfo, ) error
ProcessTaskResult processes the task result.
func (*P) RemoveEngine ¶ added in v0.135.0
func (p *P) RemoveEngine(engineID string, clusterInfo *auth.ClusterInfo)
RemoveEngine removes the engine.
type Status ¶ added in v0.215.0
type Status struct {
Tenants map[string]*TenantStatus `json:"tenants"`
}
Status is the status of the processor.
type Task ¶
type Task struct { ID string TenantID string Req *v1.CreateChatCompletionRequest Header http.Header RespCh chan *http.Response ErrCh chan error EngineID string CreatedAt time.Time // contains filtered or unexported fields }
Task is an inference task. TODO(kenji): Consider preserving the request context as well.
type TaskQueue ¶
type TaskQueue struct {
// contains filtered or unexported fields
}
TaskQueue is a queue for inference tasks.
type TaskStatus ¶ added in v0.215.0
TaskStatus is the status of a task.
type TenantStatus ¶ added in v0.215.0
type TenantStatus struct {
Engines map[string]*EngineStatus `json:"engines"`
}
TenantStatus is the status of a tenant.