Documentation
¶
Overview ¶
Package apc: API messages and constants
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package apc: API constant
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package apc: API messages and constants
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package apc: API messages and constants
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package apc: API messages and constants
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package apc: API messages and constants
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package apc: API messages and constants
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package apc: API messages and constants
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package apc: API messages and constants
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package apc: API messages and constants
- Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
Package apc: API messages and constants
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Index ¶
- Constants
- Variables
- func AccessOp(access AccessAttrs) string
- func DisplayProvider(p string) string
- func IsFltNoProps(v int) bool
- func IsFltPresent(v int) bool
- func IsProvider(p string) bool
- func IsValidCompression(c string) bool
- func NormalizeProvider(p string) string
- func SupportedPermissions() []string
- func ToScheme(p string) string
- type AccessAttrs
- type ActValRmNode
- type ActionMsg
- type CapacityInfo
- type ClusterSysInfo
- type ClusterSysInfoRaw
- type CopyBckMsg
- type JoinNodeResult
- type LsoMsg
- func (lsmsg *LsoMsg) AddProps(propNames ...string)
- func (lsmsg *LsoMsg) Clone() *LsoMsg
- func (lsmsg *LsoMsg) IsFlagSet(flags uint64) bool
- func (lsmsg *LsoMsg) PropsSet() (s cos.StrSet)
- func (lsmsg *LsoMsg) SetFlag(flag uint64)
- func (lsmsg *LsoMsg) WantOnlyRemoteProps() bool
- func (lsmsg *LsoMsg) WantProp(propName string) bool
- type MountpathList
- type TCBMsg
- type TSysInfo
- type URLPath
- type WritePolicy
Constants ¶
const ( // object level AceGET = AccessAttrs(1) << iota AceObjHEAD // permission to get object props AcePUT AceAPPEND AceObjDELETE AceObjMOVE AcePromote // permission to overwrite objects that were previously read from: // a) any remote backend that is currently not configured as the bucket's backend // b) HTPP ("ht://") since it's not writable AceDisconnectedBackend // bucket metadata AceBckHEAD // get bucket props and ACL AceObjLIST // list objects in a bucket AcePATCH // set bucket props AceBckSetACL // set bucket permissions // cluster level AceListBuckets AceShowCluster AceCreateBucket AceDestroyBucket AceMoveBucket AceAdmin // note: must be the last one AceMax )
ACL aka access permissions
const ( // encompasses all ACEs, current and future AccessAll = AccessAttrs(^uint64(0)) AllowAllAccess = "su" // read-only and read-write access to bucket AccessRO = AceGET | AceObjHEAD | AceListBuckets | AceBckHEAD | AceObjLIST AllowReadOnlyAccess = "ro" AccessRW = AccessRO | AcePUT | AceAPPEND | AceObjDELETE | AceObjMOVE AllowReadWriteAccess = "rw" AccessNone = AccessAttrs(0) // permission to perform cluster-level ops AccessCluster = AceListBuckets | AceCreateBucket | AceDestroyBucket | AceMoveBucket | AceAdmin )
derived (convenience) constants
const ( ActCreateBck = "create-bck" // NOTE: compare w/ ActAddRemoteBck below ActDestroyBck = "destroy-bck" // destroy bucket data and metadata ActSummaryBck = "summary-bck" ActCopyBck = "copy-bck" ActDownload = "download" ActECEncode = "ec-encode" // erasure code a bucket ActECGet = "ec-get" // erasure decode objects ActECPut = "ec-put" // erasure encode objects ActECRespond = "ec-resp" // respond to other targets' EC requests ActETLInline = "etl-inline" ActETLBck = "etl-bck" ActElection = "election" ActEvictRemoteBck = "evict-remote-bck" // evict remote bucket's data ActInvalListCache = "inval-listobj-cache" ActLRU = "lru" ActList = "list" ActLoadLomCache = "load-lom-cache" ActMakeNCopies = "make-n-copies" ActMoveBck = "move-bck" ActNewPrimary = "new-primary" ActPromote = "promote" ActPutCopies = "put-copies" ActRebalance = "rebalance" ActRenameObject = "rename-obj" ActResetBprops = "reset-bprops" ActResetConfig = "reset-config" ActResilver = "resilver" ActResyncBprops = "resync-bprops" ActSetBprops = "set-bprops" ActSetConfig = "set-config" ActShutdown = "shutdown" ActStartGFN = "start-gfn" ActStoreCleanup = "cleanup-store" // multi-object (via `SelectObjsMsg`) ActCopyObjects = "copy-listrange" ActDeleteObjects = "delete-listrange" ActETLObjects = "etl-listrange" ActEvictObjects = "evict-listrange" ActPrefetchObjects = "prefetch-listrange" ActArchive = "archive" // see ArchiveMsg ActAttachRemAis = "attach" ActDetachRemAis = "detach" // Node maintenance & cluster membership (see the corresponding URL path words below) ActStartMaintenance = "start-maintenance" // put into maintenance state ActStopMaintenance = "stop-maintenance" // cancel maintenance state ActShutdownNode = "shutdown-node" // shutdown node ActCallbackRmFromSmap = "callback-rm-from-smap" // set by primary when requested (internal use only) ActDecommissionNode = "decommission-node" // start rebalance and, when done, remove node from Smap ActDecommission = "decommission" // decommission all nodes in the cluster (cleanup system data) ActAdminJoinTarget = "admin-join-target" ActSelfJoinTarget = "self-join-target" ActAdminJoinProxy = "admin-join-proxy" ActSelfJoinProxy = "self-join-proxy" ActKeepaliveUpdate = "keepalive-update" // IC ActSendOwnershipTbl = "ic-send-own-tbl" ActListenToNotif = "watch-xaction" ActMergeOwnershipTbl = "ic-merge-own-tbl" ActRegGlobalXaction = "reg-global-xaction" )
ActionMsg.Action includes Xaction.Kind == ActionMsg.Action (when the action is asynchronous)
const ( // Actions on mountpaths (/v1/daemon/mountpaths) ActMountpathAttach = "attach-mp" ActMountpathEnable = "enable-mp" ActMountpathDetach = "detach-mp" ActMountpathDisable = "disable-mp" // Actions on xactions ActXactStop = Stop ActXactStart = Start // auxiliary ActTransient = "transient" // transient - in-memory only )
const ( ActBegin = "begin" ActCommit = "commit" ActAbort = "abort" )
xaction begin-commit phases
const ( CompressAlways = "always" CompressNever = "never" )
Compression enum
const ( PropBucketAccessAttrs = "access" // Bucket access attributes. PropBucketVerEnabled = "versioning.enabled" // Enable/disable object versioning in a bucket. PropBucketCreated = "created" // Bucket creation time. PropBackendBck = "backend_bck" PropBackendBckName = PropBackendBck + ".name" PropBackendBckProvider = PropBackendBck + ".provider" )
Configuration and bucket properties
const ( Proxy = "proxy" Target = "target" )
const ( DeploymentK8s = "K8s" DeploymentDev = "dev" )
deployment types
const ( DefaultTimeout = time.Duration(-1) LongTimeout = time.Duration(-2) )
timeouts for intra-cluster requests
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" // 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" // 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" )
Header Key conventions:
- starts with a prefix "ais-",
- all words separated with "-": no dots and underscores.
const ( HdrAuthorization = "Authorization" // https://developer.mozilla.org/en-US/docs/Web/HTTP/Hdrs/Authorization AuthenticationTypeBearer = "Bearer" )
AuthN consts
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" )
Internally used headers
const ( // Applies to objects from the buckets with remote backends (e.g., to optimize-out listing remotes) // See related Flt* enum LsObjCached = 1 << iota LsAll // include misplaced objects and replicas LsDeleted // include obj-s marked for deletion (TODO) LsArchDir // expand archives as directories LsNameOnly // return only object names and statuses (for faster listing) // LsDontHeadRemote tells AIS _not_ to execute HEAD request on the remote bucket. // The reasons may include cleanup/eviction of any kind, prior knowledge that the bucket // must simply exist in AIS, and more. // See also: // * `cmn/feat/feat.go` source, and the (configurable) capability // to disable on-the-fly creation of remote buckets altogether. LsDontHeadRemote // LsTryHeadRemote is introduced primarily to support GCP buckets with // ACL policies that allow public _anonymous_ access. // // It appears that sometimes those policies do honor HEAD(bucket), // while other times they don't, failing the request with 401 or 403 status. // See also: // * at https://cloud.google.com/storage/docs/access-control/making-data-public LsTryHeadRemote // To list remote buckets that, if not be present in AIS, shall not be added to AIS // (TODO: reserved for future use) LsDontAddRemote // cache list-objects results and use this cache to speed-up UseListObjsCache // For remote buckets - list only remote props (aka `wantOnlyRemote`). When false, // the default that's being used is: `WantOnlyRemoteProps` - see below. // When true, the request gets executed in a pass-through fashion whereby a single ais target // simply forwards it to the associated remote backend and delivers the results as is to the // requesting proxy and, subsequently, to client. LsWantOnlyRemoteProps )
LsoMsg flags
const ( DefaultPageSizeAIS = 10000 DefaultPageSizeCloud = 1000 )
List objects default page size
const ( // Status LocOK = iota LocMisplacedNode LocMisplacedMountpath LocIsCopy LocIsCopyMissingObj // Flags EntryIsCached = 1 << (EntryStatusBits + 1) EntryInArch = 1 << (EntryStatusBits + 2) )
const ( EntryStatusBits = 5 // N bits EntryStatusMask = (1 << EntryStatusBits) - 1 // mask for N low bits )
ObjEntry.Flags field
const ( GetPropsName = "name" GetPropsSize = "size" GetPropsVersion = "version" GetPropsChecksum = "checksum" GetPropsAtime = "atime" GetPropsCached = "cached" GetPropsStatus = "status" GetPropsCopies = "copies" GetPropsEC = "ec" GetPropsCustom = "custom" GetPropsLocation = "location" // advanced usage )
LsoMsg and HEAD(object) enum (NOTE: compare with `cmn.ObjectProps`)
const ( AIS = "ais" AWS = "aws" Azure = "azure" GCP = "gcp" HDFS = "hdfs" HTTP = "ht" AllProviders = "ais, aws (s3://), gcp (gs://), azure (az://), hdfs://, ht://" // NOTE: must include all NsUUIDPrefix = '@' // BEWARE: used by on-disk layout NsNamePrefix = '#' // BEWARE: used by on-disk layout BckProviderSeparator = "://" BckObjnameSeparator = "/" // scheme:// DefaultScheme = "https" GSScheme = "gs" S3Scheme = "s3" AZScheme = "az" AISScheme = "ais" )
Backend Provider enum
const ( QparamWhat = "what" // "smap" | "bmd" | "config" | "stats" | "xaction" ... (enum below) QparamProps = "props" // e.g. "checksum, size"|"atime, size"|"cached"|"bucket, size"| ... QparamUUID = "uuid" // xaction QparamRegex = "regex" // dsort/downloader regex // remove existing custom keys and store new custom metadata // NOTE: making an s/_/-/ naming exception because of the namesake CLI usage QparamNewCustom = "set-new-custom" // Main bucket query params. QparamProvider = "provider" // aka backend provider or, simply, backend QparamNamespace = "namespace" // e.g., usage: copy bucket QparamBckTo = "bck_to" // Do not add remote bucket to cluster's BMD e.g. when checking existence // via api.HeadBucket // By default, when existence of a remote buckets is confirmed the bucket's // metadata gets automatically (and transactionally) added to the cluster's BMD. // This query parameter can be used to override the default behavior. QparamDontAddRemote = "dont_add_remote_bck_md" // When evicting, keep remote bucket in BMD (i.e., evict data only) QparamKeepRemote = "keep_bck_md" // NOTE: "presence" in a given cluster shall not be be confused with "existence" (possibly, remote). // See also: // - Flt* enum below // - ListObjsMsg flags, docs/providers.md (for terminology) QparamFltPresence = "presence" // Object related query params. QparamAppendType = "append_type" QparamAppendHandle = "append_handle" // HTTP bucket support. QparamOrigURL = "original_url" // Log severity QparamSev = "severity" // see { LogInfo, ...} enum // Archive filename and format (mime type) QparamArchpath = "archpath" QparamArchmime = "archmime" // Skip loading existing object's metadata, in part to // compare its Checksum and update its existing Version (if exists). // Can be used to reduce PUT latency when: // - we massively write new content into a bucket, and/or // - we simply don't care. QparamSkipVC = "skip_vc" // force the operation; allows to overcome certain restrictions (e.g., shutdown primary and the entire cluster) // or errors (e.g., attach invalid mountpath) QparamForce = "frc" )
URL Query "?name1=val1&name2=..." User query params.
const ( FltExists = iota // (object | bucket) exists inside and/or outside FltExistsNoProps // same as above but no need to return props/info FltPresent // bucket: is present; object: present and properly located FltPresentNoProps // same as above but no need to return props/info FltPresentAnywhere // objects: present anywhere/anyhow _in_ the cluster (replica, ec-slices, misplaced) FltExistsOutside // not present - exists outside cluster, e.g. cloud bucket )
QparamFltPresence enum. Descibes both buckets and objects with respect to their existence/presence (or non-existence/non-presence) in a given AIS cluster.
(Terminology: "FltPresent*" here refers to availability (i.e., "presence") in the cluster.)
Remote object or bucket that is currently not present can still be accessed with the very first access making it "present", etc.
const ( AppendOp = "append" FlushOp = "flush" )
QparamAppendType enum.
const ( TaskStart = Start TaskStatus = "status" TaskResult = "result" )
QparamTaskAction enum.
const ( QparamHealthReadiness = "readiness" // to be used by external watchdogs (e.g. K8s) QparamAskPrimary = "apr" // true: the caller is directing health request to primary QparamPrimaryReadyReb = "prr" // true: check whether primary is ready to start rebalancing cluster )
health
const ( QparamProxyID = "pid" // ID of the redirecting proxy. QparamPrimaryCandidate = "can" // ID of the candidate for the primary proxy. QparamPrepare = "prp" // true: request belongs to the "prepare" phase of the primary proxy election QparamNonElectable = "nel" // true: proxy is non-electable for the primary role QparamUnixTime = "utm" // Unix time since 01/01/70 UTC (nanoseconds) QparamIsGFNRequest = "gfn" // true if the request is a Get-From-Neighbor QparamSilent = "sln" // true: destination should not log errors (HEAD request) QparamRebStatus = "rbs" // true: get detailed rebalancing status QparamRebData = "rbd" // true: get EC rebalance data (pulling data if push way fails) QparamTaskAction = "tac" // "start", "status", "result" QparamClusterInfo = "cii" // true: /Health to return cluster info and status QparamOWT = "owt" // object write transaction enum { OwtPut, ..., OwtGet* } QparamDontResilver = "dntres" // true: do not resilver data off of mountpaths that are being disabled/detached // dsort QparamTotalCompressedSize = "tcs" QparamTotalInputShardsExtracted = "tise" QparamTotalUncompressedSize = "tunc" // 2PC transactions - control plane QparamNetwTimeout = "xnt" // [begin, start-commit] timeout QparamHostTimeout = "xht" // [begin, txn-done] timeout QparamWaitMetasync = "xwm" // true: wait for metasync (used only when there's an alternative) // promote QparamActNoXact = "act-no-xact" // execute synchronously, i.e. without xaction // Notification target's node ID (usually, the node that initiates the operation). QparamNotifyMe = "nft" )
Internal query params.
const ( GetWhatBMD = "bmd" GetWhatConfig = "config" GetWhatClusterConfig = "cluster_config" GetWhatDaemonStatus = "status" GetWhatDiskStats = "disk" GetWhatMountpaths = "mountpaths" GetWhatRemoteAIS = "remote" GetWhatSmap = "smap" GetWhatSmapVote = "smapvote" GetWhatSnode = "snode" GetWhatStats = "stats" GetWhatXactStatus = "status" // IC status by uuid. GetWhatSysInfo = "sysinfo" GetWhatTargetIPs = "target_ips" // comma-separated list of all target IPs (compare w/ GetWhatSnode) GetWhatLog = "log" )
QparamWhat enum.
const ( GetWhatXactStats = "getxstats" // stats: xaction by uuid GetWhatQueryXactStats = "qryxstats" // stats: all matching xactions GetWhatICBundle = "ic_bundle" )
Internal "what" values.
const ( LogInfo = "info" LogWarn = "warning" LogErr = "error" )
QparamSev enum.
const ( // l1 Version = "v1" // l2 Buckets = "buckets" Objects = "objects" EC = "ec" Download = "download" Daemon = "daemon" Cluster = "cluster" Tokens = "tokens" Metasync = "metasync" Health = "health" Vote = "vote" ObjStream = "objstream" MsgStream = "msgstream" Reverse = "reverse" Rebalance = "rebalance" Xactions = "xactions" S3 = "s3" Txn = "txn" // 2PC Notifs = "notifs" // intra-cluster notifications Users = "users" // AuthN Clusters = "clusters" // AuthN Roles = "roles" // AuthN IC = "ic" // information center // l3 SyncSmap = "syncsmap" // legacy Voteres = "result" VoteInit = "init" Mountpaths = "mountpaths" // (see the corresponding action messages above) Keepalive = "keepalive" AdminJoin = "join-by-admin" // when node is joined by admin ("manual join") SelfJoin = "autoreg" // auto-join cluster at startup CallbackRmSelf = "cb-rm-from-smap" // set by primary to request that node calls back to request removal (internal use only!) // common Init = "init" Start = "start" Stop = "stop" Abort = "abort" Sort = "sort" Finished = "finished" Progress = "progress" // dSort, downloader, query Metrics = "metrics" Records = "records" Shards = "shards" FinishedAck = "finished_ack" List = "list" Remove = "remove" Next = "next" Peek = "peek" Discard = "discard" WorkerOwner = "worker" // TODO: it should be removed once get-next-bytes endpoint is ready // ETL ETL = "etl" ETLInitSpec = "init_spec" ETLInitCode = "init_code" ETLInfo = "info" ETLList = List ETLLogs = "logs" ETLObject = "_object" ETLStop = Stop ETLStart = Start ETLHealth = "health" )
RESTful URL path: l1/l2/l3
const ( WriteImmediate = WritePolicy("immediate") // immediate write (default) WriteDelayed = WritePolicy("delayed") // cache and flush when not accessed for a while (lom_cache_hk.go) WriteNever = WritePolicy("never") // transient - in-memory only WriteDefault = WritePolicy("") // same as `WriteImmediate` - see IsImmediate() below )
const (
ActAddRemoteBck = "add-remote-bck"
)
internal - add (usually, on the fly) existing remote bucket to AIS BMD
const HdrError = "Hdr-Error"
const LZ4Compression = "lz4"
sent via req.Header.Set(apc.HdrCompress, LZ4Compression) (alternative to lz4 compressions upon popular request)
const PropsLocationSepa = ":"
Variables ¶
var ( GetPropsMinimal = []string{GetPropsName, GetPropsSize} GetPropsDefault = []string{GetPropsName, GetPropsSize, GetPropsChecksum, GetPropsAtime} GetPropsAll = append(GetPropsDefault, GetPropsVersion, GetPropsCached, GetPropsStatus, GetPropsCopies, GetPropsEC, GetPropsCustom, GetPropsLocation) )
NOTE: update when changing any of the above :NOTE
var ( URLPathS3 = urlpath(S3) // URLPath{[]string{S3}, S3} URLPathBuckets = urlpath(Version, Buckets) URLPathObjects = urlpath(Version, Objects) URLPathEC = urlpath(Version, EC) URLPathNotifs = urlpath(Version, Notifs) URLPathTxn = urlpath(Version, Txn) URLPathXactions = urlpath(Version, Xactions) URLPathIC = urlpath(Version, IC) URLPathHealth = urlpath(Version, Health) URLPathMetasync = urlpath(Version, Metasync) URLPathRebalance = urlpath(Version, Rebalance) URLPathClu = urlpath(Version, Cluster) URLPathCluProxy = urlpath(Version, Cluster, Proxy) URLPathCluUserReg = urlpath(Version, Cluster, AdminJoin) URLPathCluAutoReg = urlpath(Version, Cluster, SelfJoin) URLPathCluKalive = urlpath(Version, Cluster, Keepalive) URLPathCluDaemon = urlpath(Version, Cluster, Daemon) URLPathCluSetConf = urlpath(Version, Cluster, ActSetConfig) URLPathCluAttach = urlpath(Version, Cluster, ActAttachRemAis) URLPathCluDetach = urlpath(Version, Cluster, ActDetachRemAis) URLPathDae = urlpath(Version, Daemon) URLPathDaeProxy = urlpath(Version, Daemon, Proxy) URLPathDaeSetConf = urlpath(Version, Daemon, ActSetConfig) URLPathDaeAdminJoin = urlpath(Version, Daemon, AdminJoin) URLPathDaeRmSelf = urlpath(Version, Daemon, CallbackRmSelf) URLPathReverse = urlpath(Version, Reverse) URLPathReverseDae = urlpath(Version, Reverse, Daemon) URLPathVote = urlpath(Version, Vote) URLPathVoteInit = urlpath(Version, Vote, Init) URLPathVoteProxy = urlpath(Version, Vote, Proxy) URLPathVoteVoteres = urlpath(Version, Vote, Voteres) URLPathdSort = urlpath(Version, Sort) URLPathdSortInit = urlpath(Version, Sort, Init) URLPathdSortStart = urlpath(Version, Sort, Start) URLPathdSortList = urlpath(Version, Sort, List) URLPathdSortAbort = urlpath(Version, Sort, Abort) URLPathdSortShards = urlpath(Version, Sort, Shards) URLPathdSortRecords = urlpath(Version, Sort, Records) URLPathdSortMetrics = urlpath(Version, Sort, Metrics) URLPathdSortAck = urlpath(Version, Sort, FinishedAck) URLPathdSortRemove = urlpath(Version, Sort, Remove) URLPathDownload = urlpath(Version, Download) URLPathDownloadAbort = urlpath(Version, Download, Abort) URLPathDownloadRemove = urlpath(Version, Download, Remove) URLPathETL = urlpath(Version, ETL) URLPathETLObject = urlpath(Version, ETL, ETLObject) URLPathTokens = urlpath(Version, Tokens) // authn URLPathUsers = urlpath(Version, Users) URLPathClusters = urlpath(Version, Clusters) URLPathRoles = urlpath(Version, Roles) )
var ErrETLMissingUUID = errors.New("ETL UUID can't be empty")
var SupportedCompression = []string{CompressNever, CompressAlways}
var SupportedWritePolicy = []string{string(WriteImmediate), string(WriteDelayed), string(WriteNever)}
Functions ¶
func AccessOp ¶
func AccessOp(access AccessAttrs) string
func DisplayProvider ¶
func IsFltNoProps ¶
func IsFltPresent ¶
func IsProvider ¶
func IsValidCompression ¶
func NormalizeProvider ¶
Types ¶
type AccessAttrs ¶
type AccessAttrs uint64
func StrToAccess ¶
func StrToAccess(accessStr string) (access AccessAttrs, err error)
func (AccessAttrs) Describe ¶
func (a AccessAttrs) Describe() string
func (AccessAttrs) Has ¶
func (a AccessAttrs) Has(perms AccessAttrs) bool
func (AccessAttrs) String ¶
func (a AccessAttrs) String() string
type ActValRmNode ¶
type ActValRmNode struct { DaemonID string `json:"sid"` SkipRebalance bool `json:"skip_rebalance"` RmUserData bool `json:"rm_user_data"` // decommission-only KeepInitialConfig bool `json:"keep_initial_config"` // ditto (to be able to restart a node from scratch) NoShutdown bool `json:"no_shutdown"` }
ActionMsg is a JSON-formatted control structures used in a majority of API calls
type ActionMsg ¶
type ActionMsg struct { Value any `json:"value"` // action-specific and optional Action string `json:"action"` // ActShutdown, ActRebalance, and many more (see apc/const.go) Name string `json:"name"` // action-specific name (e.g., bucket name) }
ActionMsg is a JSON-formatted control structures used in a majority of API calls
type CapacityInfo ¶
type CapacityInfo struct { Used uint64 `json:"fs_used,string"` Total uint64 `json:"fs_capacity,string"` PctUsed float64 `json:"pct_fs_used"` }
sysinfo
type ClusterSysInfo ¶
type ClusterSysInfo struct { Proxy map[string]*cos.MemCPUInfo `json:"proxy"` Target map[string]*TSysInfo `json:"target"` }
sysinfo
type ClusterSysInfoRaw ¶
type ClusterSysInfoRaw struct { Proxy cos.JSONRawMsgs `json:"proxy"` Target cos.JSONRawMsgs `json:"target"` }
sysinfo
type CopyBckMsg ¶
type CopyBckMsg struct { Prefix string `json:"prefix"` // Prefix added to each resulting object. DryRun bool `json:"dry_run"` // Don't perform any PUT Force bool `json:"force"` // Force running in presence of a potential "limited coexistence" type conflict }
copy & (offline) transform bucket to bucket
type JoinNodeResult ¶
type LsoMsg ¶
type LsoMsg struct { UUID string `json:"uuid"` // ID to identify a single multi-page request Props string `json:"props"` // object props to return, e.g. "checksum,size,custom" (Get* enum above) TimeFormat string `json:"time_format"` // RFC822 is the default Prefix string `json:"prefix"` // objname filter: return names starting with prefix StartAfter string `json:"start_after"` // start listing after (AIS buckets only) ContinuationToken string `json:"continuation_token"` // BucketList.ContinuationToken SID string `json:"target"` // selected target to solely execute backend.list-objects Flags uint64 `json:"flags,string"` // enum {LsObjCached, ...} - see above PageSize uint `json:"pagesize"` // max entries returned by list objects call }
func (*LsoMsg) WantOnlyRemoteProps ¶
type MountpathList ¶
type MountpathList struct { Available []string `json:"available"` WaitingDD []string `json:"waiting_dd"` Disabled []string `json:"disabled"` }
MountpathList contains two lists:
- Available - list of local mountpaths available to the storage target
- WaitingDD - waiting for resilvering completion to be detached or disabled (moved to `Disabled`)
- Disabled - list of disabled mountpaths, the mountpaths that generated IO errors followed by (FSHC) health check, etc.
type TCBMsg ¶
type TCBMsg struct { // Resulting objects names will have this extension. Warning: if in a source bucket exist two objects with the // same base name, but different extension, specifying this field might cause object overriding. This is because // of resulting name conflict. // TODO: this field might not be required when transformation on subset (template) of bucket is supported. Ext cos.StrKVs `json:"ext"` ID string `json:"id,omitempty"` // optional, ETL only RequestTimeout cos.Duration `json:"request_timeout,omitempty"` // optional, ETL only CopyBckMsg }
copy & (offline) transform bucket to bucket
type WritePolicy ¶
type WritePolicy string
write policy (enum and accessors) applies to both AIS metadata and data; bucket-configurable with global defaults via cluster config
func (WritePolicy) IsImmediate ¶
func (wp WritePolicy) IsImmediate() bool
func (WritePolicy) Validate ¶
func (wp WritePolicy) Validate() (err error)