backend

package
v1.3.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 17 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func NewDummyBackend

func NewDummyBackend(t cluster.TargetPut) (cluster.BackendProvider, error)

func NewHTTP

func NewHTTP(t cluster.TargetPut, config *cmn.Config) cluster.BackendProvider

Types

type AISBackendProvider

type AISBackendProvider struct {
	// contains filtered or unexported fields
}

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) GetObj

func (m *AISBackendProvider) GetObj(_ ctx, lom *cluster.LOM, owt cmn.OWT) (errCode int, err error)

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 (m *AISBackendProvider) ListBuckets(qbck cmn.QueryBcks) (bcks cmn.Bcks, errCode int, err error)

func (*AISBackendProvider) ListObjects

func (m *AISBackendProvider) ListObjects(remoteBck *cluster.Bck, msg *apc.LsoMsg, lst *cmn.LsoResult) (errCode int, err error)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL