models

package
v5.6.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobDescription

type BlobDescription struct {
	// contains filtered or unexported fields
}

Describes a blob

func NewBlobDescription

func NewBlobDescription(name string, offset int64, length int64) BlobDescription

func (*BlobDescription) Length

func (d *BlobDescription) Length() int64

func (*BlobDescription) Name

func (d *BlobDescription) Name() string

func (*BlobDescription) Offset

func (d *BlobDescription) Offset() int64

type ChannelErrorHandler

type ChannelErrorHandler interface {
	HasFatalError() bool     // Determines if a fatal error has happened while transferring a file, i.e. don't transfer more blobs for this file.
	SetFatalError(err error) // Sets a fatal error for the associated file. This will stop future blobs from being sent from this channel.
}

type GetObject

type GetObject struct {
	Name           string
	Ranges         []models.Range
	ChannelBuilder WriteChannelBuilder
}

type PutObject

type PutObject struct {
	PutObject      models.Ds3PutObject
	ChannelBuilder ReadChannelBuilder
	Metadata       map[string]string
}

func (*PutObject) WithMetaData

func (putObject *PutObject) WithMetaData(key string, values ...string) interface{}

type ReadChannelBuilder

type ReadChannelBuilder interface {
	IsChannelAvailable(offset int64) bool
	GetChannel(offset int64) (io.ReadCloser, error)
	OnDone(reader io.ReadCloser) // Determines what a given blob does when it finishes transferring
	ChannelErrorHandler
}

type WriteChannelBuilder

type WriteChannelBuilder interface {
	IsChannelAvailable(offset int64) bool
	GetChannel(offset int64) (io.WriteCloser, error)
	OnDone(writer io.WriteCloser) // Determines what a given blob does when it finishes transferring
	ChannelErrorHandler
}

Jump to

Keyboard shortcuts

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