object

package
v1.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 37 Imported by: 93

Documentation

Overview

Package object for the Ceph object store.

Index

Constants

View Source
const (
	RGWErrorNone = iota
	RGWErrorUnknown
	RGWErrorNotFound
	RGWErrorBadData
	RGWErrorParse
	ErrorCodeFileExists = 17
)
View Source
const (

	// AppName is the name Rook uses for the object store's application
	AppName = "rook-ceph-rgw"
)

Variables

This section is empty.

Functions

func Add added in v1.3.0

func Add(mgr manager.Manager, context *clusterd.Context) error

Add creates a new cephObjectStore Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

func DeleteBucket added in v1.0.0

func DeleteBucket(c *Context, bucketName string, purge bool) (int, error)

func DeleteUser added in v1.0.0

func DeleteUser(c *Context, id string, opts ...string) (string, error)

DeleteUser deletes the user with the given ID.

func GetBucketsStats added in v1.0.0

func GetBucketsStats(c *Context) (map[string]ObjectBucketStats, error)

func GetObjectBucketProvisioner added in v1.3.4

func GetObjectBucketProvisioner(c *clusterd.Context, namespace string) string

GetObjectBucketProvisioner returns the bucket provisioner name appended with operator namespace if OBC is watching on it

func LinkUser added in v1.1.0

func LinkUser(c *Context, id, bucket string) (string, int, error)

func ListUsers added in v1.0.0

func ListUsers(c *Context) ([]string, int, error)

ListUsers lists the object pool users.

func SetQuotaUserBucketMax added in v1.1.0

func SetQuotaUserBucketMax(c *Context, id string, max int) (string, int, error)

func UnlinkUser added in v1.1.0

func UnlinkUser(c *Context, id, bucket string) (string, int, error)

Types

type Context added in v1.0.0

type Context struct {
	Context     *clusterd.Context
	Name        string
	ClusterName string
	RunAsUser   string
}

Context holds the context for the object store.

func NewContext added in v1.0.0

func NewContext(context *clusterd.Context, name, clusterName string) *Context

NewContext creates a new object store context.

type ObjectBucket added in v1.0.0

type ObjectBucket struct {
	Name string `json:"name"`
	ObjectBucketMetadata
	ObjectBucketStats
}

func GetBucket added in v1.0.0

func GetBucket(c *Context, bucket string) (*ObjectBucket, int, error)

func ListBuckets added in v1.0.0

func ListBuckets(c *Context) ([]ObjectBucket, error)

type ObjectBucketMetadata added in v1.0.0

type ObjectBucketMetadata struct {
	Owner     string    `json:"owner"`
	CreatedAt time.Time `json:"createdAt"`
}

type ObjectBucketStats added in v1.0.0

type ObjectBucketStats struct {
	Size            uint64 `json:"size"`
	NumberOfObjects uint64 `json:"numberOfObjects"`
}

func GetBucketStats added in v1.0.0

func GetBucketStats(c *Context, bucketName string) (*ObjectBucketStats, bool, error)

type ObjectBuckets added in v1.0.0

type ObjectBuckets []ObjectBucket

func (ObjectBuckets) Len added in v1.0.0

func (slice ObjectBuckets) Len() int

func (ObjectBuckets) Less added in v1.0.0

func (slice ObjectBuckets) Less(i, j int) bool

func (ObjectBuckets) Swap added in v1.0.0

func (slice ObjectBuckets) Swap(i, j int)

type ObjectUser added in v1.0.0

type ObjectUser struct {
	UserID      string  `json:"userId"`
	DisplayName *string `json:"displayName"`
	Email       *string `json:"email"`
	AccessKey   *string `json:"accessKey"`
	SecretKey   *string `json:"secretKey"`
}

An ObjectUser defines the details of an object store user.

func CreateUser added in v1.0.0

func CreateUser(c *Context, user ObjectUser) (*ObjectUser, int, error)

CreateUser creates a new user with the information given.

func GetUser added in v1.0.0

func GetUser(c *Context, id string) (*ObjectUser, int, error)

GetUser returns the user with the given ID.

func UpdateUser added in v1.0.0

func UpdateUser(c *Context, user ObjectUser) (*ObjectUser, int, error)

UpdateUser updates the user whose ID matches the user.

type ReconcileCephObjectStore added in v1.3.0

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

ReconcileCephObjectStore reconciles a cephObjectStore object

func (*ReconcileCephObjectStore) Reconcile added in v1.3.0

Reconcile reads that state of the cluster for a cephObjectStore object and makes changes based on the state read and what is in the cephObjectStore.Spec The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.

Directories

Path Synopsis
Package objectuser to manage a rook object store user.
Package objectuser to manage a rook object store user.

Jump to

Keyboard shortcuts

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