forked from NVIDIA/aistore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
headers.go
91 lines (71 loc) · 3.35 KB
/
headers.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// Package apc: API messages and constants
/*
* Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
*/
package apc
// For standard and provider-specific HTTP headers, see cmn/cos/const_http.go
const HdrError = "Hdr-Error"
// Header Key conventions:
// - starts with a prefix "ais-",
// - all words separated with "-": no dots and underscores.
const (
HeaderPrefix = "ais-"
// Bucket props headers.
HdrBucketProps = HeaderPrefix + "bucket-props" // => cmn.BucketProps
HdrBucketSumm = HeaderPrefix + "bucket-summ" // => cmn.BsummResult (see also: QparamFltPresence)
HdrBucketVerEnabled = HeaderPrefix + "versioning-enabled" // Enable/disable object versioning in a bucket.
HdrBucketCreated = HeaderPrefix + "created" // Bucket creation time.
HdrBackendProvider = HeaderPrefix + "provider" // ProviderAmazon et al. - see cmn/bck.go.
// including BucketProps.Extra.AWS
HdrS3Region = HeaderPrefix + "cloud_region"
HdrS3Endpoint = HeaderPrefix + "endpoint"
HdrS3AccessKeyID = HeaderPrefix + "access_key_id"
HdrS3SecretAccessKey = HeaderPrefix + "secret_access_key"
// including BucketProps.Extra.HTTP
HdrOrigURLBck = HeaderPrefix + "original-url"
// remote AIS
HdrRemAisUUID = HeaderPrefix + "remote-ais-uuid"
HdrRemAisAlias = HeaderPrefix + "remote-ais-alias"
HdrRemAisURL = HeaderPrefix + "remote-ais-url"
HdrRemoteOffline = HeaderPrefix + "remote-offline" // When accessing cached remote bucket with no backend connectivity.
// Object props headers
HdrObjCksumType = HeaderPrefix + "checksum-type" // Checksum type, one of SupportedChecksums().
HdrObjCksumVal = HeaderPrefix + "checksum-value" // Checksum value.
HdrObjAtime = HeaderPrefix + "atime" // Object access time.
HdrObjCustomMD = HeaderPrefix + "custom-md" // Object custom metadata.
HdrObjVersion = HeaderPrefix + "version" // Object version/generation - ais or cloud.
// Archive filename and format (mime type)
HdrArchpath = HeaderPrefix + "archpath"
HdrArchmime = HeaderPrefix + "archmime"
// Append object header.
HdrAppendHandle = HeaderPrefix + "append-handle"
// api.PutApndArchArgs message flags
HdrPutApndArchFlags = HeaderPrefix + "pine"
// Query objects handle header.
HdrHandle = HeaderPrefix + "query-handle"
// Reverse proxy headers.
HdrNodeID = HeaderPrefix + "node-id"
HdrNodeURL = HeaderPrefix + "node-url"
// uptimes, respectively
HdrNodeUptime = HeaderPrefix + "node-uptime"
HdrClusterUptime = HeaderPrefix + "cluster-uptime"
)
// AuthN consts
const (
HdrAuthorization = "Authorization" // https://developer.mozilla.org/en-US/docs/Web/HTTP/Hdrs/Authorization
AuthenticationTypeBearer = "Bearer"
)
// Internally used headers
const (
HdrCallerID = HeaderPrefix + "caller-id" // Marker of intra-cluster request.
HdrT2TPutterID = HeaderPrefix + "putter-id" // DaemonID of the target that performs intra-cluster PUT
HdrCallerName = HeaderPrefix + "caller-name"
HdrCallerSmapVersion = HeaderPrefix + "caller-smap-ver"
HdrXactionID = HeaderPrefix + "xaction-id"
// Stream related headers.
HdrSessID = HeaderPrefix + "session-id"
HdrCompress = HeaderPrefix + "compress" // LZ4Compression, etc.
// Promote(dir)
HdrPromoteNamesHash = HeaderPrefix + "promote-names-hash"
HdrPromoteNamesNum = HeaderPrefix + "promote-names-num"
)