Documentation ¶
Overview ¶
Package backend contains implementation of various backend providers.
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package backend contains implementation of various backend providers.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package backend contains implementation of various backend providers.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package backend contains implementation of various backend providers.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package backend contains implementation of various backend providers.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package backend contains implementation of various backend providers.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package backend contains implementation of various backend providers.
- Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
Package backend contains implementation of various backend providers.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Index ¶
- func Init()
- func NewAWS(_ cluster.TargetPut) (cluster.BackendProvider, error)
- func NewAzure(_ cluster.TargetPut) (cluster.BackendProvider, error)
- func NewDummyBackend(t cluster.TargetPut) (cluster.BackendProvider, error)
- func NewGCP(_ cluster.TargetPut) (cluster.BackendProvider, error)
- func NewHDFS(_ cluster.TargetPut) (cluster.BackendProvider, error)
- func NewHTTP(t cluster.TargetPut, config *cmn.Config) cluster.BackendProvider
- type AISBackendProvider
- func (m *AISBackendProvider) A2U(aliasOrUUID string) string
- func (m *AISBackendProvider) Apply(v any, action string, cfg *cmn.ClusterConfig) error
- func (*AISBackendProvider) CreateBucket(_ *cluster.Bck) (errCode int, err error)
- func (m *AISBackendProvider) DeleteObj(lom *cluster.LOM) (errCode int, err error)
- func (m *AISBackendProvider) GetInfo(clusterConf cmn.BackendConfAIS) (res cluster.Remotes)
- func (m *AISBackendProvider) GetInfoInternal() (res cluster.Remotes)
- func (m *AISBackendProvider) GetObj(_ ctx, lom *cluster.LOM, owt cmn.OWT) (errCode int, err error)
- func (m *AISBackendProvider) GetObjReader(_ ctx, lom *cluster.LOM) (r io.ReadCloser, expCksum *cos.Cksum, errCode int, err error)
- func (m *AISBackendProvider) HeadBucket(_ ctx, remoteBck *cluster.Bck) (bckProps cos.StrKVs, errCode int, err error)
- func (m *AISBackendProvider) HeadObj(_ ctx, lom *cluster.LOM) (oa *cmn.ObjAttrs, errCode int, err error)
- func (m *AISBackendProvider) ListBuckets(qbck cmn.QueryBcks) (bcks cmn.Bcks, errCode int, err error)
- func (m *AISBackendProvider) ListObjects(remoteBck *cluster.Bck, msg *apc.LsoMsg, lst *cmn.LsoResult) (errCode int, err error)
- func (*AISBackendProvider) MaxPageSize() uint
- func (*AISBackendProvider) Provider() string
- func (m *AISBackendProvider) PutObj(r io.ReadCloser, lom *cluster.LOM) (errCode int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDummyBackend ¶
func NewDummyBackend(t cluster.TargetPut) (cluster.BackendProvider, error)
Types ¶
type AISBackendProvider ¶
type AISBackendProvider struct {
// contains filtered or unexported fields
}
func NewAIS ¶
func NewAIS(t cluster.TargetPut) *AISBackendProvider
func (*AISBackendProvider) A2U ¶
func (m *AISBackendProvider) A2U(aliasOrUUID string) string
func (*AISBackendProvider) Apply ¶
func (m *AISBackendProvider) Apply(v any, action string, cfg *cmn.ClusterConfig) error
apply new or updated (attach, detach) cmn.BackendConfAIS configuration
func (*AISBackendProvider) CreateBucket ¶
func (*AISBackendProvider) CreateBucket(_ *cluster.Bck) (errCode int, err error)
func (*AISBackendProvider) DeleteObj ¶
func (m *AISBackendProvider) DeleteObj(lom *cluster.LOM) (errCode int, err error)
func (*AISBackendProvider) GetInfo ¶
func (m *AISBackendProvider) GetInfo(clusterConf cmn.BackendConfAIS) (res cluster.Remotes)
At the same time a cluster may have registered both types of remote AIS clusters(HTTP and HTTPS). So, the method must use both kinds of clients and select the correct one at the moment it sends a request. See also: GetInfoInternal() TODO: ditto
func (*AISBackendProvider) GetInfoInternal ¶
func (m *AISBackendProvider) GetInfoInternal() (res cluster.Remotes)
return (m.remote + m.alias) in-memory info wo/ connecting to remote cluster(s) (compare with GetInfo() below) TODO: caller to pass its cached version to optimize-out allocations
func (*AISBackendProvider) GetObjReader ¶
func (m *AISBackendProvider) GetObjReader(_ ctx, lom *cluster.LOM) (r io.ReadCloser, expCksum *cos.Cksum, errCode int, err error)
func (*AISBackendProvider) HeadBucket ¶
func (m *AISBackendProvider) HeadBucket(_ ctx, remoteBck *cluster.Bck) (bckProps cos.StrKVs, errCode int, err error)
TODO: remote AIS clusters provide native frontend API with additional capabilities that, in particular, include `dontAddRemote` = (true | false). Here we have to hardcode the value to keep HeadBucket() consistent across all backends. For similar limitations, see also ListBuckets() below.
func (*AISBackendProvider) HeadObj ¶
func (m *AISBackendProvider) HeadObj(_ ctx, lom *cluster.LOM) (oa *cmn.ObjAttrs, errCode int, err error)
TODO: remote AIS clusters provide native frontend API with additional capabilities in part including apc.Flt* location specifier. Here, and elsewhere down below, we hardcode (the default) `apc.FltPresent` to, eesentially, keep HeadObj() consistent across backends.
func (*AISBackendProvider) ListBuckets ¶
func (*AISBackendProvider) ListObjects ¶
func (*AISBackendProvider) MaxPageSize ¶
func (*AISBackendProvider) MaxPageSize() uint
func (*AISBackendProvider) Provider ¶
func (*AISBackendProvider) Provider() string
func (*AISBackendProvider) PutObj ¶
func (m *AISBackendProvider) PutObj(r io.ReadCloser, lom *cluster.LOM) (errCode int, err error)