cubefs

Форк
0
/
const.go 
148 строк · 5.4 Кб
1
// Copyright 2018 The CubeFS Authors.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
//     http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
// implied. See the License for the specific language governing
13
// permissions and limitations under the License.
14

15
package cmd
16

17
const (
18
	// List of operation name for cli
19
	CliOpGet                  = "get"
20
	CliOpList                 = "list"
21
	CliOpStatus               = "stat"
22
	CliOpCreate               = "create"
23
	CliOpDelete               = "delete"
24
	CliOpInfo                 = "info"
25
	CliOpAdd                  = "add"
26
	CliOpSet                  = "set"
27
	CliOpUpdate               = "update"
28
	CliOpDecommission         = "decommission"
29
	CliOpRecommission         = "recommission"
30
	CliOpQueryProgress        = "query-progress"
31
	CliOpMigrate              = "migrate"
32
	CliOpDownloadZip          = "load"
33
	CliOpMetaCompatibility    = "meta"
34
	CliOpFreeze               = "freeze"
35
	CliOpSetThreshold         = "threshold"
36
	CliOpSetCluster           = "set"
37
	CliOpCheck                = "check"
38
	CliOpReset                = "reset"
39
	CliOpReplicate            = "add-replica"
40
	CliOpDelReplica           = "del-replica"
41
	CliOpExpand               = "expand"
42
	CliOpShrink               = "shrink"
43
	CliOpGetDiscard           = "get-discard"
44
	CliOpSetDiscard           = "set-discard"
45
	CliOpForbidMpDecommission = "forbid-mp-decommission"
46

47
	// Shorthand format of operation name
48
	CliOpDecommissionShortHand = "dec"
49

50
	// resource name
51
	CliResourceDataNode      = "datanode [COMMAND]"
52
	CliResourceMetaNode      = "metanode"
53
	CliResourceDataPartition = "datapartition"
54
	CliResourceMetaPartition = "metapartition"
55
	CliResourceTopology      = "topology"
56
	CliResourceRaftNode      = "raftnode"
57
	CliResourceDisk          = "disk"
58
	CliResourceConfig        = "config"
59

60
	// Flags
61
	CliFlagName                = "name"
62
	CliFlagOnwer               = "user"
63
	CliFlagDataPartitionSize   = "dp-size"
64
	CliFlagDataPartitionCount  = "dp-count"
65
	CliFlagMetaPartitionCount  = "mp-count"
66
	CliFlagReplicas            = "replicas"
67
	CliFlagEnable              = "enable"
68
	CliFlagEnableFollowerRead  = "follower-read"
69
	CliFlagAuthenticate        = "authenticate"
70
	CliFlagCapacity            = "capacity"
71
	CliFlagBusiness            = "description"
72
	CliFlagMPCount             = "mp-count"
73
	CliFlagDPCount             = "dp-count"
74
	CliFlagReplicaNum          = "replica-num"
75
	CliFlagSize                = "size"
76
	CliFlagVolType             = "vol-type"
77
	CliFlagFollowerRead        = "follower-read"
78
	CliFlagCacheRuleKey        = "cache-rule-key"
79
	CliFlagEbsBlkSize          = "ebs-blk-size"
80
	CliFlagCacheCapacity       = "cache-capacity"
81
	CliFlagCacheAction         = "cache-action"
82
	CliFlagCacheThreshold      = "cache-threshold"
83
	CliFlagCacheTTL            = "cache-ttl"
84
	CliFlagCacheHighWater      = "cache-high-water"
85
	CliFlagCacheLowWater       = "cache-low-water"
86
	CliFlagCacheLRUInterval    = "cache-lru-interval"
87
	CliFlagCacheRule           = "cache-rule"
88
	CliFlagThreshold           = "threshold"
89
	CliFlagAddress             = "addr"
90
	CliFlagDiskPath            = "path"
91
	CliFlagAuthKey             = "authkey"
92
	CliFlagINodeStartID        = "inode-start"
93
	CliFlagId                  = "id"
94
	CliFlagZoneName            = "zone-name"
95
	CliFlagDescription         = "description"
96
	CliFlagAutoRepairRate      = "autoRepairRate"
97
	CliFlagDelBatchCount       = "batchCount"
98
	CliFlagDelWorkerSleepMs    = "deleteWorkerSleepMs"
99
	CliFlagLoadFactor          = "loadFactor"
100
	CliFlagMarkDelRate         = "markDeleteRate"
101
	CliFlagMaxDpCntLimit       = "maxDpCntLimit"
102
	CliFlagDataNodeSelector    = "dataNodeSelector"
103
	CliFlagMetaNodeSelector    = "metaNodeSelector"
104
	CliFlagDataNodesetSelector = "dataNodesetSelector"
105
	CliFlagMetaNodesetSelector = "metaNodesetSelector"
106
	CliFlagCrossZone           = "crossZone"
107
	CliNormalZonesFirst        = "normalZonesFirst"
108
	CliFlagCount               = "count"
109
	CliDpReadOnlyWhenVolFull   = "readonly-when-full"
110
	CliTxMask                  = "transaction-mask"
111
	CliTxTimeout               = "transaction-timeout"
112
	CliTxOpLimit               = "transaction-limit"
113
	CliTxConflictRetryNum      = "tx-conflict-retry-num"
114
	CliTxConflictRetryInterval = "tx-conflict-retry-Interval"
115
	CliTxForceReset            = "transaction-force-reset"
116
	CliFlagMaxFiles            = "maxFiles"
117
	CliFlagMaxBytes            = "maxBytes"
118
	CliFlagMaxConcurrencyInode = "maxConcurrencyInode"
119
	CliFlagForceInode          = "forceInode"
120
	CliFlagEnableQuota         = "enableQuota"
121
	CliFlagDeleteLockTime      = "delete-lock-time"
122
	CliFlagClientIDKey         = "clientIDKey"
123

124
	// CliFlagSetDataPartitionCount	= "count" use dp-count instead
125

126
	// Shorthand format of resource name
127
	ResourceDataNodeShortHand      = "dn"
128
	ResourceMetaNodeShortHand      = "mn"
129
	ResourceDataPartitionShortHand = "dp"
130
	ResourceMetaPartitionShortHand = "mp"
131

132
	// Usages
133
	CliUsageClientIDKey = "needed if cluster authentication is on"
134
	// version op
135
	CliFlagVersionCreate      = "verCreate"
136
	CliFlagVersionList        = "verList"
137
	CliFlagVersionDel         = "verDel"
138
	CliFlagVersionSetStrategy = "verSetStrategy"
139
)
140

141
type MasterOp int
142

143
const (
144
	OpExpandVol MasterOp = iota
145
	OpShrinkVol
146
	OpCreateVol
147
	OpDeleteVol
148
)
149

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.