storage

package
v0.0.0-...-3f9ec74 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const CORE_MACHINE_NUMBER = 8
View Source
const MAX_UPLOAD_BLOCK_SIZE = 32 * 1024 * 1024 // 32MB

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureBlob

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

AzureBlob represents a AzureBlob connection to a named container

func NewAzureBlob

func NewAzureBlob(accountName, accessKey, containerName string, devmode bool) (*AzureBlob, error)

NewAzureBlob creates an instance of AzureBlob accountName is the AZURE_STORAGE_ACCOUNT accessKey is the AZURE_STORAGE_ACCESS_KEY containerName is the container name

func (*AzureBlob) Download

func (ab *AzureBlob) Download(path, filename string) ([]byte, error)

Download a file from blob

func (*AzureBlob) UploadAsJson

func (ab *AzureBlob) UploadAsJson(ctx context.Context, fileNamePrefix, payload string) (elapsedTime int64, err error)

UploadAsJson loads the payload into Azure Blob Storage

type IStorage

type IStorage interface {
	UploadAsJson(ctx context.Context, fullpath, payload string) (totalElapsedTimeInMilliseconds int64, err error)
}

func GetClient

func GetClient() (IStorage, error)

GetClient factory storage

Jump to

Keyboard shortcuts

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