storage

package
v0.0.0-...-b52e348 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultEndpoint rados gateway endpoint
	DefaultEndpoint = "http://localhost:7480"

	// Access credentials for radosgw
	DefaultAccessKey = "vertadmin"
	DefaultSecretKey = "vertadmin"

	DefaultZone = "in.south.tn"

	DefaultCost = "1.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled    bool    `json:"enabled" toml:"enabled"`
	RgwStorage RadosGw `json:"radosgw" toml:"radosgw"`
}

Config represents the meta configuration.

func NewConfig

func NewConfig() *Config

func (Config) String

func (c Config) String() string

type RadosGW

type RadosGW struct {
	UserId      string `json:"uid"`
	Api         *radosAPI.API
	TotalSizeMB float64 `json:"total_size"`
	Bucket      string  `json:"bucket_name"`
}

func NewRgW

func NewRgW(host, access, secret string) *RadosGW

func (*RadosGW) GetUserBucketSize

func (r *RadosGW) GetUserBucketSize(name, user string) error

func (*RadosGW) GetUserStorageSize

func (r *RadosGW) GetUserStorageSize() error

type RadosGw

type RadosGw struct {
	Enabled bool     `json:"enabled" toml:"enabled"`
	Regions []Region `json:"region" toml:"region"`
}

type Region

type Region struct {
	Enabled     bool   `json:"enabled" toml:"enabled"`
	Zone        string `json:"radosgw_region" toml:"radosgw_region"`
	EndPoint    string `json:"radosgw_host" toml:"radosgw_host"`
	AdminUser   string `json:"admin_user" toml:"admin_user"`
	AdminAccess string `json:"admin_access_key" toml:"admin_access_key"`
	AdminSecret string `json:"admin_secret_key" toml:"admin_secret_key"`
	StorageUnit string `json:"storage_unit" toml:"storage_unit"`
	CostPerHour string `json:"cost_per_hour" toml:"cost_per_hour"`
}

Jump to

Keyboard shortcuts

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