pcm-coordinator/internal/scheduler/service/inference/inference.go

44 lines
930 B
Go

package inference
import (
"context"
"gitlink.org.cn/JointCloud/pcm-coordinator/internal/scheduler/schedulers/option"
)
const (
FORWARD_SLASH = "/"
)
type ICluster interface {
GetInferUrl(ctx context.Context, option *option.InferOption) ([]*InferUrl, error)
GetInferDeployInstanceList(ctx context.Context) ([]*DeployInstance, error)
StartInferDeployInstance(ctx context.Context, id string) bool
StopInferDeployInstance(ctx context.Context, id string) bool
GetInferDeployInstance(ctx context.Context, id string) (*DeployInstance, error)
}
type IInference interface {
CreateTask() (int64, error)
InferTask(id int64) error
}
type Inference struct {
In IInference
}
type InferUrl struct {
Url string
Card string
}
type DeployInstance struct {
InstanceName string
InstanceId string
ModelName string
ModelType string
InferCard string
ClusterName string
Status string
CreatedTime string
}