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 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"`
}
Click to show internal directories.
Click to hide internal directories.