1
1
// Package apc: API control messages and constants
2
2
/*
3
- * Copyright (c) 2018-2024 , NVIDIA CORPORATION. All rights reserved.
3
+ * Copyright (c) 2018-2025 , NVIDIA CORPORATION. All rights reserved.
4
4
*/
5
5
package apc
6
6
@@ -11,7 +11,12 @@ import (
11
11
"github.com/NVIDIA/aistore/cmn/cos"
12
12
)
13
13
14
- // copy & (offline) transform bucket to bucket
14
+ // offline copy/transform: bucket-to-bucket and multi-object
15
+
16
+ // NOTE: see cmn/api for cmn.TCOMsg that also contains source and destination buckets
17
+
18
+ // TODO: `ContinueOnError` not implemented for the most part
19
+
15
20
type (
16
21
CopyBckMsg struct {
17
22
Prepend string `json:"prepend"` // destination naming, as in: dest-obj-name = Prepend + source-obj-name
@@ -25,16 +30,33 @@ type (
25
30
Name string `json:"id,omitempty"`
26
31
Timeout cos.Duration `json:"request_timeout,omitempty"`
27
32
}
33
+
34
+ // bucket to bucket
28
35
TCBMsg struct {
29
- // NOTE: objname extension ----------------------------------------------------------------------
36
+ // Objname Extension ----------------------------------------------------------------------
30
37
// - resulting object names will have this extension, if specified.
31
38
// - if source bucket has two (or more) objects with the same base name but different extension,
32
39
// specifying this field might cause unintended override.
33
- // - this field might not be any longer required - TODO review
40
+ // - this field might not be any longer required
34
41
Ext cos.StrKVs `json:"ext"`
35
42
36
43
Transform
37
44
CopyBckMsg
45
+
46
+ // user-defined number of concurrent workers:
47
+ // - 0 (default) - number of mountpaths
48
+ // - (-1) - single thread, serial execution
49
+ NumWorkers int `json:"num-workers"`
50
+
51
+ ContinueOnError bool `json:"coer"`
52
+ }
53
+
54
+ // multi-object
55
+ // (cmn.TCOMsg = TCOMsg + source and destination buckets)
56
+ TCOMsg struct {
57
+ TxnUUID string // (plstcx client; one control message)
58
+ TCBMsg
59
+ ListRange
38
60
}
39
61
)
40
62
0 commit comments