Documentation
¶
Index ¶
- Constants
- type Object
- type ObjectMeta
- func (om *ObjectMeta) Exist(key string) bool
- func (om *ObjectMeta) GetExistingRandomObject() *Object
- func (om *ObjectMeta) GetHeadAndTailKey() (string, string)
- func (om *ObjectMeta) GetRandomObject() *Object
- func (om *ObjectMeta) PopExistingRandomObject() *Object
- func (om *ObjectMeta) RegisterToExistingList(key string)
- func (om *ObjectMeta) TidyUp()
Constants ¶
View Source
const ( MaxBucketNameLength = 16 MaxKeyLength = 12 KeyShortPrefix = "ov" // len(KeyShortPrefix) + 2 (for process ID) + 2 (for worker ID) KeyPrefixLength = 6 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Object ¶
type ObjectMeta ¶ added in v0.4.0
type ObjectMeta struct {
ObjectList []Object `json:"objectList"`
ExistingObjectIDs []int64 `json:"existingObjectIDs"`
KeyIDOffset int64 `json:"keyIDOffset"`
KeyPrefix string
// contains filtered or unexported fields
}
func NewObjectMeta ¶ added in v0.5.3
func NewObjectMeta(numObj int, keyIDOffset int64) *ObjectMeta
func (*ObjectMeta) Exist ¶ added in v0.4.0
func (om *ObjectMeta) Exist(key string) bool
func (*ObjectMeta) GetExistingRandomObject ¶ added in v0.4.0
func (om *ObjectMeta) GetExistingRandomObject() *Object
func (*ObjectMeta) GetHeadAndTailKey ¶ added in v0.4.0
func (om *ObjectMeta) GetHeadAndTailKey() (string, string)
func (*ObjectMeta) GetRandomObject ¶ added in v0.4.0
func (om *ObjectMeta) GetRandomObject() *Object
func (*ObjectMeta) PopExistingRandomObject ¶ added in v0.4.0
func (om *ObjectMeta) PopExistingRandomObject() *Object
func (*ObjectMeta) RegisterToExistingList ¶ added in v0.4.0
func (om *ObjectMeta) RegisterToExistingList(key string)
Caution: this function should be called while the object lock is acquired.
func (*ObjectMeta) TidyUp ¶ added in v1.0.0
func (om *ObjectMeta) TidyUp()
Click to show internal directories.
Click to hide internal directories.