internal

package
v0.6.12 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2018 License: Apache-2.0, BSD-3-Clause, MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//None No status avaiable.
	None = iota
	//Started Indicates that the file was included in the transfer.
	Started
	//Completed Indicates that the file was transferred succesfully.
	Completed
	//Ignored Indicates that the file was ignored - e.g. empty files...
	Ignored
)
View Source
const ProgramVersion = "0.6.12"

ProgramVersion blobporter version

Variables

View Source
var HTTPClientTimeout = 90

HTTPClientTimeout HTTP client timeout when reading from HTTP sources and try timeout for blob storage operations.

View Source
var UserAgentStr = fmt.Sprintf("%s/%s/%s", "BlobPorter", ProgramVersion, runtime.GOARCH)

UserAgentStr value included in the user-agent header when calling the blob API

Functions

This section is empty.

Types

type AzUtil

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

AzUtil TODO

func NewAzUtil

func NewAzUtil(accountName string, accountKey string, container string, baseBlobURL string) (*AzUtil, error)

NewAzUtil TODO

func (*AzUtil) CleanUncommittedBlocks

func (p *AzUtil) CleanUncommittedBlocks(blobName string) error

CleanUncommittedBlocks TODO

func (*AzUtil) CreateContainerIfNotExists

func (p *AzUtil) CreateContainerIfNotExists() (bool, error)

CreateContainerIfNotExists returs true if the container did not exist.

func (*AzUtil) CreatePageBlob

func (p *AzUtil) CreatePageBlob(blobName string, size uint64) error

CreatePageBlob TODO

func (*AzUtil) GetBlobURLWithReadOnlySASToken

func (p *AzUtil) GetBlobURLWithReadOnlySASToken(blobName string, expTime time.Time) url.URL

GetBlobURLWithReadOnlySASToken TODO

func (*AzUtil) IterateBlobList

func (p *AzUtil) IterateBlobList(prefix string, callback BlobCallback) error

IterateBlobList TODO

func (*AzUtil) PutBlock

func (p *AzUtil) PutBlock(container string, blobName string, id string, body io.ReadSeeker) error

PutBlock TODO

func (*AzUtil) PutBlockBlob

func (p *AzUtil) PutBlockBlob(blobName string, body io.ReadSeeker, md5 []byte) error

PutBlockBlob TODO

func (*AzUtil) PutBlockList

func (p *AzUtil) PutBlockList(blobName string, blockIDs []string) error

PutBlockList TODO

func (*AzUtil) PutPages

func (p *AzUtil) PutPages(blobName string, start int64, end int64, body io.ReadSeeker) error

PutPages TODO

type BlobCallback

type BlobCallback func(*azblob.Blob, string) (bool, error)

BlobCallback TODO

type FileHandlePool

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

FileHandlePool TODO

func NewFileHandlePool

func NewFileHandlePool(maxHandlesPerFile int, mode HandleMode, overwrite bool) *FileHandlePool

NewFileHandlePool TODO

func (*FileHandlePool) CloseHandles

func (f *FileHandlePool) CloseHandles(path string) error

CloseHandles TODO

func (*FileHandlePool) GetHandle

func (f *FileHandlePool) GetHandle(path string) (*os.File, error)

GetHandle TODO

func (*FileHandlePool) ReturnHandle

func (f *FileHandlePool) ReturnHandle(path string, handle *os.File) error

ReturnHandle TODO

type HandleMode

type HandleMode int

HandleMode TODO

const (
	//Read read only file handles
	Read HandleMode = iota
	//Write write and append file handles
	Write
)

type SourceFilter

type SourceFilter interface {
	IsTransferredAndTrackIfNot(name string, size int64) (bool, error)
}

SourceFilter TODO

type TransferStatus

type TransferStatus int

TransferStatus TODO

func (TransferStatus) String

func (t TransferStatus) String() string

type TransferTracker

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

TransferTracker TODO

func NewTransferTracker

func NewTransferTracker(logPath string) (*TransferTracker, error)

NewTransferTracker TODO

func (*TransferTracker) IsTransferredAndTrackIfNot

func (t *TransferTracker) IsTransferredAndTrackIfNot(name string, size int64) (bool, error)

IsTransferredAndTrackIfNot returns true if the file was previously transferred. If not, track/log that the transferred was started.

func (*TransferTracker) TrackFileTransferComplete

func (t *TransferTracker) TrackFileTransferComplete(name string) error

TrackFileTransferComplete TODO

func (*TransferTracker) TrackTransferComplete

func (t *TransferTracker) TrackTransferComplete() error

TrackTransferComplete TODO

Jump to

Keyboard shortcuts

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