Documentation
¶
Index ¶
- type P
- func (p *P) AddOrUpdateEngineStatus(srv engineCommunicator, engineStatus *v1.EngineStatus, ...)
- 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 Task
- type TaskQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) 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 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.
Click to show internal directories.
Click to hide internal directories.