objectstorage

package
v2.1.45 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AsyncWriteBack writes the object asynchronously to the backend.
	AsyncWriteBack = iota

	// WriteBack writes the object synchronously to the backend.
	WriteBack

	// Ephemeral only writes the object to the dfdaemon.
	// It is only provided for creating temporary objects between peers,
	// and users are not allowed to use this mode.
	Ephemeral
)
View Source
const (
	PrometheusSubsystemName = "dragonfly_dfdaemon_object_stroage"
	OtelServiceName         = "dragonfly-dfdaemon-object-storage"
)
View Source
const (
	// CopyOperation is the operation of copying object.
	CopyOperation = "copy"
)
View Source
const (
	RouterGroupBuckets = "/buckets"
)

Variables

View Source
var GinLogFileName = "gin-object-stroage.log"

Functions

This section is empty.

Types

type BucketParams added in v2.0.30

type BucketParams struct {
	// ID is the id of the bucket.
	ID string `uri:"id" binding:"required"`
}

type CopyObjectRequest added in v2.0.30

type CopyObjectRequest struct {
	// SourceBucket is the source object key.
	SourceObjectKey string `form:"source_object_key" binding:"required"`
}

type GetObjectMetadatasQuery added in v2.0.30

type GetObjectMetadatasQuery struct {
	// A delimiter is a character used to group keys.
	Delimiter string `form:"delimiter" binding:"omitempty"`

	// Marker indicates the starting object key for listing.
	Marker string `form:"marker" binding:"omitempty"`

	// Sets the maximum number of keys returned in the response.
	Limit int64 `form:"limit" binding:"omitempty"`

	// Limits the response to keys that begin with the specified prefix.
	Prefix string `form:"prefix" binding:"omitempty"`
}

type GetObjectQuery

type GetObjectQuery struct {
	// Filter is the filter of the object.
	Filter string `form:"filter" binding:"omitempty"`
}

type ObjectParams

type ObjectParams struct {
	// ID is the id of the bucket.
	ID string `uri:"id" binding:"required"`

	// ObjectKey is the object key.
	ObjectKey string `uri:"object_key" binding:"required"`
}

type ObjectStorage

type ObjectStorage interface {
	// Started object storage server.
	Serve(lis net.Listener) error

	// Stop object storage server.
	Stop() error
}

ObjectStorage is the interface used for object storage server.

func New

func New(cfg *config.DaemonOption, dynconfig config.Dynconfig, peerTaskManager peer.TaskManager, storageManager storage.Manager, logDir string) (ObjectStorage, error)

New returns a new ObjectStorage instance.

type PutObjectRequest added in v2.0.30

type PutObjectRequest struct {
	// Mode is the mode of putting object.
	Mode uint `form:"mode,default=0" binding:"omitempty,gte=0,lte=2"`

	// Filter is the filter of the object.
	Filter string `form:"filter" binding:"omitempty"`

	// MaxReplicas is the max replicas of the object.
	MaxReplicas int `form:"maxReplicas" binding:"omitempty,gt=0,lte=100"`

	// File is the file of the object.
	File *multipart.FileHeader `form:"file" binding:"required"`
}

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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