objectstorage

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

type CopyObjectRequest

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

type GetObjectMetadatasQuery

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 instence.

type PutObjectRequest

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
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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