Documentation ¶
Index ¶
Constants ¶
View Source
const ( FileEventNeedDownload = "file:download" FileEventDownloaded = "file:downloaded" )
Variables ¶
View Source
var ( ReplayFilesKey = []byte("task:replay") ReservedFields = []string{"GO", "AS", "TO", "OR", "AND", "XOR", "USE", "SET", "FROM", "WHERE", "MATCH", "INSERT", "YIELD", "RETURN", "DESCRIBE", "DESC", "VERTEX", "VERTICES", "EDGE", "EDGES", "UPDATE", "UPSERT", "WHEN", "DELETE", "FIND", "LOOKUP", "ALTER", "STEPS", "STEP", "OVER", "UPTO", "REVERSELY", "INDEX", "INDEXES", "REBUILD", "BOOL", "INT8", "INT16", "INT32", "INT64", "INT", "FLOAT", "DOUBLE", "STRING", "FIXED_STRING", "TIMESTAMP", "DATE", "TIME", "DATETIME", "TAG", "TAGS", "UNION", "INTERSECT", "MINUS", "NO", "OVERWRITE", "SHOW", "ADD", "CREATE", "DROP", "REMOVE", "IF", "NOT", "EXISTS", "WITH", "CHANGE", "GRANT", "REVOKE", "ON", "BY", "IN", "NOT_IN", "DOWNLOAD", "GET", "OF", "ORDER", "INGEST", "COMPACT", "FLUSH", "SUBMIT", "ASC", "ASCENDING", "DESCENDING", "DISTINCT", "FETCH", "PROP", "BALANCE", "STOP", "LIMIT", "OFFSET", "IS", "NULL", "RECOVER", "EXPLAIN", "PROFILE", "FORMAT", "CASE"} )
View Source
var (
DownloadFilesKey = []byte("task:download")
)
View Source
var (
RetrieveFilesKey = []byte("task:retrieve")
)
Functions ¶
Types ¶
type FileRef ¶
type FileRef struct { ID string `json:"id,omitempty"` Index int64 `json:"index,omitempty"` Count int64 `json:"count,omitempty"` FileSize int64 `json:"file_size,omitempty"` CheckSum string `json:"check_sum,omitempty"` Expert string `json:"expert,omitempty"` // file saved path on node machine Path string `json:"path,omitempty"` LocalPath string `json:"local_path,omitempty"` // file info RootCID cid.Cid `json:"root_cid,omitempty"` PieceCID cid.Cid `json:"piece_cid,omitempty"` PieceSize uint64 `json:"piece_size,omitempty"` // file download url Url string `json:"url,omitempty"` Status Status `json:"status,omitempty"` }
type ListData ¶
type ListData struct { Id string `json:"id"` Expert string `json:"expert"` Index int64 `json:"index"` FileName string `json:"file_name"` FileUrl string `json:"file_url"` Status string `json:"status"` Count int64 `json:"count"` FileSize int64 `json:"file_size"` //文件大小 CheckSum string `json:"check_sum"` //文件md5 }
type ListResponse ¶
type ListResponse struct { Code ResponseCode List []ListData Callback string `json:"callback"` OnchainCallback string `json:"onchain_callback"` }
type ResponseCode ¶
type Task ¶
type Task interface { // Start tasks Start(context.Context) error // Stop tasks Stop(context.Context) error }
Taskinterface
type TaskManager ¶
type TaskManager struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.