modsloads3

package
v0.0.0-...-f09cf9b Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "offload-s3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Endpoint     string
	Bucket       string
	BucketExists atomic.Bool
	Concurrency  int
	DataPath     string
	// contains filtered or unexported fields
}

func New

func New() *Module

func (*Module) Delete

func (m *Module) Delete(ctx context.Context, className, shardName, nodeName string) error

Delete deletes content of a shard assigned to specific node in cloud provider (S3, Azure Blob storage, Google cloud storage) Careful: if shardName and nodeName is passed empty it will delete all class frozen shards in cloud storage {cloud_provider}://{configured_bucket}/{className}/{shardName}/{nodeName}/{shard content}

func (*Module) Download

func (m *Module) Download(ctx context.Context, className, shardName, nodeName string) error

Download downloads the content of a shard to desired node from cloud provider (S3, Azure Blob storage, Google cloud storage) {dataPath}/{className}/{shardName}/{content}

func (*Module) DownloadToPath

func (m *Module) DownloadToPath(ctx context.Context, className, shardName, nodeName, localPath string) error

func (*Module) Init

func (m *Module) Init(ctx context.Context,
	params moduletools.ModuleInitParams,
) error

func (*Module) Name

func (m *Module) Name() string

func (*Module) RootHandler

func (m *Module) RootHandler() http.Handler

func (*Module) Type

func (*Module) Upload

func (m *Module) Upload(ctx context.Context, className, shardName, nodeName string) error

Upload uploads the content of a shard assigned to specific node to cloud provider (S3, Azure Blob storage, Google cloud storage) {cloud_provider}://{configured_bucket}/{className}/{shardName}/{nodeName}/{shard content}

func (*Module) VerifyBucket

func (m *Module) VerifyBucket(ctx context.Context) error

Jump to

Keyboard shortcuts

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