frostfs

package
v0.0.0-...-6eb7966 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Overview

REMOVE THIS AFTER SIGNATURE WILL BE AVAILABLE IN TREE CLIENT FROM FROSTFS NODE

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthmateFrostFS

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

AuthmateFrostFS is a mediator which implements authmate.FrostFS through pool.Pool.

func NewAuthmateFrostFS

func NewAuthmateFrostFS(p *pool.Pool) *AuthmateFrostFS

NewAuthmateFrostFS creates new AuthmateFrostFS using provided pool.Pool.

func (*AuthmateFrostFS) ContainerExists

func (x *AuthmateFrostFS) ContainerExists(ctx context.Context, idCnr cid.ID) error

ContainerExists implements authmate.FrostFS interface method.

func (*AuthmateFrostFS) CreateContainer

func (x *AuthmateFrostFS) CreateContainer(ctx context.Context, prm authmate.PrmContainerCreate) (cid.ID, error)

CreateContainer implements authmate.FrostFS interface method.

func (*AuthmateFrostFS) CreateObject

func (x *AuthmateFrostFS) CreateObject(ctx context.Context, prm tokens.PrmObjectCreate) (oid.ID, error)

CreateObject implements authmate.FrostFS interface method.

func (*AuthmateFrostFS) ReadObjectPayload

func (x *AuthmateFrostFS) ReadObjectPayload(ctx context.Context, addr oid.Address) ([]byte, error)

ReadObjectPayload implements authmate.FrostFS interface method.

func (*AuthmateFrostFS) TimeToEpoch

func (x *AuthmateFrostFS) TimeToEpoch(ctx context.Context, futureTime time.Time) (uint64, uint64, error)

TimeToEpoch implements authmate.FrostFS interface method.

type FrostFS

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

FrostFS represents virtual connection to the FrostFS network. It is used to provide an interface to dependent packages which work with FrostFS.

func NewFrostFS

func NewFrostFS(p *pool.Pool) *FrostFS

NewFrostFS creates new FrostFS using provided pool.Pool.

func (*FrostFS) Container

func (x *FrostFS) Container(ctx context.Context, idCnr cid.ID) (*container.Container, error)

Container implements frostfs.FrostFS interface method.

func (*FrostFS) ContainerEACL

func (x *FrostFS) ContainerEACL(ctx context.Context, id cid.ID) (*eacl.Table, error)

ContainerEACL implements frostfs.FrostFS interface method.

func (*FrostFS) CreateContainer

func (x *FrostFS) CreateContainer(ctx context.Context, prm layer.PrmContainerCreate) (cid.ID, error)

CreateContainer implements frostfs.FrostFS interface method.

If prm.BasicACL is zero, 'eacl-public-read-write' is used.

func (*FrostFS) CreateObject

func (x *FrostFS) CreateObject(ctx context.Context, prm layer.PrmObjectCreate) (oid.ID, error)

CreateObject implements frostfs.FrostFS interface method.

func (*FrostFS) DeleteContainer

func (x *FrostFS) DeleteContainer(ctx context.Context, id cid.ID, token *session.Container) error

DeleteContainer implements frostfs.FrostFS interface method.

func (*FrostFS) DeleteObject

func (x *FrostFS) DeleteObject(ctx context.Context, prm layer.PrmObjectDelete) error

DeleteObject implements frostfs.FrostFS interface method.

func (*FrostFS) ReadObject

func (x *FrostFS) ReadObject(ctx context.Context, prm layer.PrmObjectRead) (*layer.ObjectPart, error)

ReadObject implements frostfs.FrostFS interface method.

func (*FrostFS) SetContainerEACL

func (x *FrostFS) SetContainerEACL(ctx context.Context, table eacl.Table, sessionToken *session.Container) error

SetContainerEACL implements frostfs.FrostFS interface method.

func (*FrostFS) TimeToEpoch

func (x *FrostFS) TimeToEpoch(ctx context.Context, now, futureTime time.Time) (uint64, uint64, error)

TimeToEpoch implements frostfs.FrostFS interface method.

func (*FrostFS) UserContainers

func (x *FrostFS) UserContainers(ctx context.Context, id user.ID) ([]cid.ID, error)

UserContainers implements frostfs.FrostFS interface method.

type NodeResponse

type NodeResponse interface {
	GetMeta() []*tree.KeyValue
	GetNodeId() uint64
	GetParentId() uint64
	GetTimestamp() uint64
}

type PoolStatistic

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

PoolStatistic is a mediator which implements authmate.FrostFS through pool.Pool.

func NewPoolStatistic

func NewPoolStatistic(p *pool.Pool) *PoolStatistic

NewPoolStatistic creates new PoolStatistic using provided pool.Pool.

func (*PoolStatistic) Statistic

func (x *PoolStatistic) Statistic() pool.Statistic

Statistic implements interface method.

type ResolverFrostFS

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

ResolverFrostFS represents virtual connection to the FrostFS network. It implements resolver.FrostFS.

func NewResolverFrostFS

func NewResolverFrostFS(p *pool.Pool) *ResolverFrostFS

NewResolverFrostFS creates new ResolverFrostFS using provided pool.Pool.

func (*ResolverFrostFS) SystemDNS

func (x *ResolverFrostFS) SystemDNS(ctx context.Context) (string, error)

SystemDNS implements resolver.FrostFS interface method.

type TreeClient

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

func NewTreeClient

func NewTreeClient(ctx context.Context, addr string, key *keys.PrivateKey) (*TreeClient, error)

NewTreeClient creates instance of TreeClient using provided address and create grpc connection.

func (*TreeClient) AddPart

func (c *TreeClient) AddPart(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64, info *data.PartInfo) (oldObjIDToDelete oid.ID, err error)

func (*TreeClient) AddVersion

func (c *TreeClient) AddVersion(ctx context.Context, bktInfo *data.BucketInfo, version *data.NodeVersion) (uint64, error)

func (*TreeClient) Close

func (c *TreeClient) Close() error

func (*TreeClient) CreateMultipartUpload

func (c *TreeClient) CreateMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, info *data.MultipartInfo) error

func (*TreeClient) DeleteBucketCORS

func (c *TreeClient) DeleteBucketCORS(ctx context.Context, bktInfo *data.BucketInfo) (oid.ID, error)

func (*TreeClient) DeleteBucketTagging

func (c *TreeClient) DeleteBucketTagging(ctx context.Context, bktInfo *data.BucketInfo) error

func (*TreeClient) DeleteMultipartUpload

func (c *TreeClient) DeleteMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64) error

func (*TreeClient) DeleteObjectTagging

func (c *TreeClient) DeleteObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) error

func (*TreeClient) GetAllVersionsByPrefix

func (c *TreeClient) GetAllVersionsByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string) ([]*data.NodeVersion, error)

func (*TreeClient) GetBucketCORS

func (c *TreeClient) GetBucketCORS(ctx context.Context, bktInfo *data.BucketInfo) (oid.ID, error)

func (*TreeClient) GetBucketTagging

func (c *TreeClient) GetBucketTagging(ctx context.Context, bktInfo *data.BucketInfo) (map[string]string, error)

func (*TreeClient) GetLatestVersion

func (c *TreeClient) GetLatestVersion(ctx context.Context, bktInfo *data.BucketInfo, objectName string) (*data.NodeVersion, error)

func (*TreeClient) GetLatestVersionsByPrefix

func (c *TreeClient) GetLatestVersionsByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string) ([]*data.NodeVersion, error)

func (*TreeClient) GetLock

func (c *TreeClient) GetLock(ctx context.Context, bktInfo *data.BucketInfo, nodeID uint64) (*data.LockInfo, error)

func (*TreeClient) GetMultipartUpload

func (c *TreeClient) GetMultipartUpload(ctx context.Context, bktInfo *data.BucketInfo, objectName, uploadID string) (*data.MultipartInfo, error)

func (*TreeClient) GetMultipartUploadsByPrefix

func (c *TreeClient) GetMultipartUploadsByPrefix(ctx context.Context, bktInfo *data.BucketInfo, prefix string) ([]*data.MultipartInfo, error)

func (*TreeClient) GetNotificationConfigurationNode

func (c *TreeClient) GetNotificationConfigurationNode(ctx context.Context, bktInfo *data.BucketInfo) (oid.ID, error)

func (*TreeClient) GetObjectTagging

func (c *TreeClient) GetObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) (map[string]string, error)

func (*TreeClient) GetObjectTaggingAndLock

func (c *TreeClient) GetObjectTaggingAndLock(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion) (map[string]string, *data.LockInfo, error)

func (*TreeClient) GetParts

func (c *TreeClient) GetParts(ctx context.Context, bktInfo *data.BucketInfo, multipartNodeID uint64) ([]*data.PartInfo, error)

func (*TreeClient) GetSettingsNode

func (c *TreeClient) GetSettingsNode(ctx context.Context, bktInfo *data.BucketInfo) (*data.BucketSettings, error)

func (*TreeClient) GetUnversioned

func (c *TreeClient) GetUnversioned(ctx context.Context, bktInfo *data.BucketInfo, filepath string) (*data.NodeVersion, error)

func (*TreeClient) GetVersions

func (c *TreeClient) GetVersions(ctx context.Context, bktInfo *data.BucketInfo, filepath string) ([]*data.NodeVersion, error)

func (*TreeClient) PutBucketCORS

func (c *TreeClient) PutBucketCORS(ctx context.Context, bktInfo *data.BucketInfo, objID oid.ID) (oid.ID, error)

func (*TreeClient) PutBucketTagging

func (c *TreeClient) PutBucketTagging(ctx context.Context, bktInfo *data.BucketInfo, tagSet map[string]string) error

func (*TreeClient) PutLock

func (c *TreeClient) PutLock(ctx context.Context, bktInfo *data.BucketInfo, nodeID uint64, lock *data.LockInfo) error

func (*TreeClient) PutNotificationConfigurationNode

func (c *TreeClient) PutNotificationConfigurationNode(ctx context.Context, bktInfo *data.BucketInfo, objID oid.ID) (oid.ID, error)

func (*TreeClient) PutObjectTagging

func (c *TreeClient) PutObjectTagging(ctx context.Context, bktInfo *data.BucketInfo, objVersion *data.NodeVersion, tagSet map[string]string) error

func (*TreeClient) PutSettingsNode

func (c *TreeClient) PutSettingsNode(ctx context.Context, bktInfo *data.BucketInfo, settings *data.BucketSettings) error

func (*TreeClient) RemoveVersion

func (c *TreeClient) RemoveVersion(ctx context.Context, bktInfo *data.BucketInfo, id uint64) error

type TreeNode

type TreeNode struct {
	ID        uint64
	ParentID  uint64
	ObjID     oid.ID
	TimeStamp uint64
	Size      int64
	Meta      map[string]string
}

func (*TreeNode) FileName

func (n *TreeNode) FileName() (string, bool)

func (*TreeNode) Get

func (n *TreeNode) Get(key string) (string, bool)

Jump to

Keyboard shortcuts

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