Documentation ¶
Overview ¶
Package object for the Ceph object store.
Index ¶
- Constants
- Variables
- func DeleteBucket(c *Context, bucketName string, purge bool) (int, error)
- func DeleteUser(c *Context, id string) (string, int, error)
- func GetBucketsStats(c *Context) (map[string]ObjectBucketStats, error)
- func ListUsers(c *Context) ([]string, int, error)
- type Context
- type ObjectBucket
- type ObjectBucketMetadata
- type ObjectBucketStats
- type ObjectBuckets
- type ObjectStoreController
- type ObjectUser
Constants ¶
View Source
const ( RGWErrorNone = iota RGWErrorUnknown RGWErrorNotFound RGWErrorBadData RGWErrorParse )
View Source
const (
// AppName is the name Rook uses for the object store's application
AppName = "rook-ceph-rgw"
)
Variables ¶
View Source
var ObjectStoreResource = opkit.CustomResource{ Name: "cephobjectstore", Plural: "cephobjectstores", Group: cephv1.CustomResourceGroup, Version: cephv1.Version, Scope: apiextensionsv1beta1.NamespaceScoped, Kind: reflect.TypeOf(cephv1.CephObjectStore{}).Name(), }
ObjectStoreResource represents the object store custom resource
View Source
var ObjectStoreResourceRookLegacy = opkit.CustomResource{ Name: "objectstore", Plural: "objectstores", Group: cephbeta.CustomResourceGroup, Version: cephbeta.Version, Scope: apiextensionsv1beta1.NamespaceScoped, Kind: reflect.TypeOf(cephbeta.ObjectStore{}).Name(), }
Functions ¶
func DeleteBucket ¶ added in v1.0.0
func DeleteUser ¶ added in v1.0.0
DeleteUser deletes the user with the given ID.
func GetBucketsStats ¶ added in v1.0.0
func GetBucketsStats(c *Context) (map[string]ObjectBucketStats, error)
Types ¶
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 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 ObjectStoreController ¶
type ObjectStoreController struct {
// contains filtered or unexported fields
}
ObjectStoreController represents a controller object for object store custom resources
func NewObjectStoreController ¶
func NewObjectStoreController( clusterInfo *daemonconfig.ClusterInfo, context *clusterd.Context, namespace string, rookImage string, cephVersion cephv1.CephVersionSpec, hostNetwork bool, ownerRef metav1.OwnerReference, dataDirHostPath string, ) *ObjectStoreController
NewObjectStoreController create controller for watching object store custom resources created
func (*ObjectStoreController) ParentClusterChanged ¶ added in v1.0.0
func (c *ObjectStoreController) ParentClusterChanged(cluster cephv1.ClusterSpec, clusterInfo *daemonconfig.ClusterInfo)
func (*ObjectStoreController) StartWatch ¶
func (c *ObjectStoreController) StartWatch(stopCh chan struct{}) error
StartWatch watches for instances of ObjectStore custom resources and acts on them
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.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.