* Copyright (c) 2026 Huawei Technologies Co., Ltd.
* openFuyao is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
* http://license.coscl.org.cn/MulanPSL2
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* See the Mulan PSL v2 for more details.
*/
package types
import "time"
type TaskHandle struct {
TaskID string `json:"taskID"`
NodeName string `json:"nodeName"`
AcceptedAt int64 `json:"acceptedAt"`
}
type TaskStatus struct {
TaskID string `json:"taskID"`
Phase WarmupTaskPhase `json:"phase"`
ProgressBytes int64 `json:"progressBytes,omitempty"`
ThroughputMBps float64 `json:"throughputMBps,omitempty"`
TransportPath TransportPath `json:"transportPath,omitempty"`
Message string `json:"message,omitempty"`
UpdatedAt int64 `json:"updatedAt"`
CachePath string `json:"cachePath,omitempty"`
StartedAt *time.Time `json:"startedAt,omitempty"`
FinishedAt *time.Time `json:"finishedAt,omitempty"`
SolidifiedManifest *SolidifiedManifest `json:"solidifiedManifest,omitempty"`
}
type SubmitWarmupRequest struct {
Plan WarmupExecutionPlan `json:"plan"`
}
type GetWarmupTaskStatusRequest struct {
TaskID string `json:"taskID"`
}
type BuildManifestRequest struct {
ArtifactKey string `json:"artifactKey"`
Source SourceEndpoint `json:"source"`
ChunkSizeBytes int64 `json:"chunkSizeBytes"`
}
type BuildManifestResponse struct {
Manifest LogicalManifest `json:"manifest"`
}
type StatExportRequest struct {
RootPath string `json:"rootPath"`
RelativePath string `json:"relativePath"`
}
type StatExportResponse struct {
SizeBytes int64 `json:"sizeBytes"`
}
type ReadChunkRequest struct {
RootPath string `json:"rootPath"`
RelativePath string `json:"relativePath"`
Offset int64 `json:"offset"`
Length int64 `json:"length"`
}
type ReadChunkResponse struct {
Data []byte `json:"data"`
CRC32C string `json:"crc32c,omitempty"`
}