storage

package
v0.0.0-...-02e5558 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeBlobPath

func ComposeBlobPath(repo string, digest string, proto string, protoVersion string) string

ComposeBlobPath composes the blob path from the 'digest, proto, proto version' repo is not used

func ComposeManifestPath

func ComposeManifestPath(repo string, tag string, proto string, protoVersion string) string

ComposeManifestPath composes the manifest path from the 'proto, proto version, repo and tag'

func DeleteBlob

func DeleteBlob(ctx *context.Context, repo string, digest string, proto string, protoVersion string) error

DeleteBlob deletes the blob TODO we need to get user in ctx, or setting in config

func DeleteManifest

func DeleteManifest(ctx *context.Context, repo string, tag string, proto string, protoVersion string) error

DeleteManifest deletes the manifest data TODO we need to get user in ctx, or setting in config

func Driver

func Driver() driver.StorageDriver

Driver returns the storage driver

func GetBlob

func GetBlob(ctx *context.Context, repo string, digest string, proto string, protoVersion string) ([]byte, error)

GetBlob gets the blob data TODO we need to get user in ctx, or setting in config

func GetManifest

func GetManifest(ctx *context.Context, repo string, tag string, proto string, protoVersion string) ([]byte, error)

GetManifest gets the manifest data TODO we need to get user in ctx, or setting in config

func HeadBlob

func HeadBlob(ctx *context.Context, repo string, digest string, proto string, protoVersion string) (driver.FileInfo, error)

HeadBlob return the blob stat TODO we need to get user in ctx, or setting in config

func HealthRegist

func HealthRegist() error

HealthRegist regists the storage health driver

func InitStorage

func InitStorage(cfg config.StorageConfig) error

InitStorage setups the storage bankends from the config file

func PutBlob

func PutBlob(ctx *context.Context, repo string, proto string, protoVersion string, data []byte) error

PutBlob puts the blob TODO we need to get user in ctx, or setting in config

func PutManifest

func PutManifest(ctx *context.Context, repo string, tag string, proto string, protoVersion string, data []byte) error

PutManifest puts the manifest data TODO we need to get user in ctx, or setting in config

Types

type Health

type Health struct {
}

Health provides interface for storage health operations

func (*Health) GetStatus

func (sh *Health) GetStatus() (string, string)

GetStatus returns the storage health status

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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