ccow

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CACHE_TIME time.Duration = 5 * 60
View Source
const MAX_POOLED_PER_TENANT uint = 10
View Source
const MAX_TENANT_REUSE uint = 10
View Source
const TENANT_RELEASE_DELAY time.Duration = 5 * 1000 * 1000 * 1000 /* 5s in ns */

Variables

View Source
var Config *string

Functions

func Not_Found

func Not_Found(err error) bool

func Read_Config

func Read_Config(home string)

Types

type Errno

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

func Error

func Error(msg string, ret C.int) Errno

func (Errno) Error

func (e Errno) Error() string

type List

type List []ListEntry

func (List) Len

func (ls List) Len() int

func (List) Less

func (ls List) Less(i, j int) bool

func (List) Swap

func (ls List) Swap(i, j int)

type ListEntry

type ListEntry struct {
	Key string
	Val []byte
}

type Meta

type Meta map[string]interface{}

func Get_Object_Meta

func Get_Object_Meta(tc *Tenant, bucket, object string) (*Meta, error)

func (*Meta) String

func (attrs *Meta) String(key string) string

func (*Meta) Uint

func (attrs *Meta) Uint(key string) uint

func (*Meta) Uint64

func (attrs *Meta) Uint64(key string) uint64

type ShardedList

type ShardedList map[string][]byte

type Stream

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

func (*Stream) Finalize

func (sr *Stream) Finalize() (*Meta, error)

func (*Stream) Get_Chunk

func (sr *Stream) Get_Chunk(buf []byte, off uint64) error

func (*Stream) Get_Default_Chunk_Size

func (sr *Stream) Get_Default_Chunk_Size() uint

func (*Stream) Get_Meta

func (sr *Stream) Get_Meta() *Meta

func (*Stream) Object_Exists

func (sr *Stream) Object_Exists() bool

func (*Stream) Put_Chunk

func (sr *Stream) Put_Chunk(buf []byte, off uint64) error

func (*Stream) Put_No_Data

func (sr *Stream) Put_No_Data() error

func (*Stream) Release

func (sr *Stream) Release()

func (*Stream) Set_Chunk_Size_Attr

func (sr *Stream) Set_Chunk_Size_Attr(size uint) error

func (*Stream) Stop

func (sr *Stream) Stop() error

type Tenant

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

func Connect

func Connect(cluster string, tenant string) (*Tenant, error)

func (*Tenant) Create_Bucket

func (tc *Tenant) Create_Bucket(bucket string) error

func (*Tenant) Delete_Bucket

func (tc *Tenant) Delete_Bucket(bucket string) error

func (*Tenant) Delete_Object

func (tc *Tenant) Delete_Object(bucket, object string) error

func (*Tenant) Get

func (tc *Tenant) Get(bucket, object string, buf []byte, off uint64) error

func (*Tenant) Get_Bucket_Meta

func (tc *Tenant) Get_Bucket_Meta(bucket string) (*Meta, error)

func (*Tenant) Get_List

func (tc *Tenant) Get_List(bucket, object string, pattern string, count int) (*List, error)

func (*Tenant) Get_Meta

func (tc *Tenant) Get_Meta(bucket, object string) (*Meta, error)

func (*Tenant) Open_Read_Stream

func (tc *Tenant) Open_Read_Stream(bucket, object string, iocount uint) (*Stream, error)

func (*Tenant) Open_Write_Stream

func (tc *Tenant) Open_Write_Stream(bucket, object string, iocount uint) (*Stream, error)

func (*Tenant) Put

func (tc *Tenant) Put(bucket, object string, buf []byte, off uint64) error

func (*Tenant) Put_Empty_Object

func (tc *Tenant) Put_Empty_Object(bucket, object string) error

func (*Tenant) Release

func (tc *Tenant) Release()

func (*Tenant) Sharded_Get_List

func (tc *Tenant) Sharded_Get_List(bucket string, name string, shards int,
	marker string, count int) (*ShardedList, error)

Jump to

Keyboard shortcuts

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