objectstorage

package
v2.0.7-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 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 (
	RouterGroupBuckets = "/buckets"
)

Variables

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

Functions

This section is empty.

Types

type GetObjectQuery

type GetObjectQuery struct {
	Filter string `form:"filter" binding:"omitempty"`
}

type ObjectParams

type ObjectParams struct {
	ID        string `uri:"id" binding:"required"`
	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 PutObjectRequset

type PutObjectRequset struct {
	Mode        uint                  `form:"mode,default=0" binding:"omitempty,gte=0,lte=2"`
	Filter      string                `form:"filter" binding:"omitempty"`
	MaxReplicas int                   `form:"maxReplicas" binding:"omitempty,gt=0,lte=100"`
	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