Documentation ¶
Index ¶
- type CheckPathExistsInput
- type ChunkMetadata
- type CommonPrefix
- type Container
- type ContainerInfo
- type Containers
- type Content
- type Context
- type CreateStreamInput
- type CurrentChunkMetadata
- type DataPlaneInput
- type DataPlaneOutput
- type DeleteObjectInput
- type DeleteStreamInput
- type DescribeStreamInput
- type DescribeStreamOutput
- type DirAttributes
- type FileMode
- type GetClusterMDInput
- type GetClusterMDOutput
- type GetContainerContentsInput
- type GetContainerContentsOutput
- type GetContainersInput
- type GetContainersOutput
- type GetItemInput
- type GetItemOutput
- type GetItemsInput
- type GetItemsOutput
- type GetObjectInput
- type GetRecordsInput
- type GetRecordsOutput
- type GetRecordsResult
- type Item
- type ItemChunk
- type ItemChunkData
- type ItemChunkMetadata
- type ItemCurrentChunkMetadata
- type ItemsCursor
- func (ic *ItemsCursor) AllSync() ([]Item, error)
- func (ic *ItemsCursor) Err() error
- func (ic *ItemsCursor) GetField(name string) interface{}
- func (ic *ItemsCursor) GetFieldInt(name string) (int, error)
- func (ic *ItemsCursor) GetFieldString(name string) (string, error)
- func (ic *ItemsCursor) GetFields() map[string]interface{}
- func (ic *ItemsCursor) GetItem() Item
- func (ic *ItemsCursor) NextItemSync() (Item, error)
- func (ic *ItemsCursor) NextSync() bool
- func (ic *ItemsCursor) Release()
- func (ic *ItemsCursor) Scattered() bool
- type NewContainerInput
- type NewSessionInput
- type PutChunkInput
- type PutItemInput
- type PutItemOutput
- type PutItemsInput
- type PutItemsOutput
- type PutOOSObjectInput
- type PutObjectInput
- type PutRecordResult
- type PutRecordsInput
- type PutRecordsOutput
- type Request
- type RequestResponse
- type Response
- type SeekShardInput
- type SeekShardInputType
- type SeekShardOutput
- type Session
- type StreamRecord
- type UpdateItemInput
- type UpdateItemOutput
- type UpdateObjectInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckPathExistsInput ¶
type CheckPathExistsInput struct { DataPlaneInput Path string }
type ChunkMetadata ¶
type CommonPrefix ¶
type CommonPrefix struct { Prefix string `xml:"Prefix"` // directory name LastModified string `xml:"LastModified"` // Date in format time.RFC3339: "2019-06-02T14:30:39.18Z" AccessTime string `xml:"AccessTime"` // Date in format time.RFC3339: "2019-06-02T14:30:39.18Z" CreatingTime string `xml:"CreatingTime"` // Date in format time.RFC3339: "2019-06-02T14:30:39.18Z" Mode FileMode `xml:"Mode"` // octal number, e.g. 040775 GID string `xml:"GID"` // Hexadecimal representation of GID (e.g. "3e8" -> i.e. "0x3e8" == 1000) UID string `xml:"UID"` // Hexadecimal representation of UID (e.g. "3e8" -> i.e. "0x3e8" == 1000) InodeNumber *uint64 `xml:"InodeNumber"` // iNode number ShardCount int `xml:"ShardCount"` // For stream-dirs only - the number of shards in the stream RetentionPeriodHours int `xml:"RetentionPeriodHours"` // For stream-dirs only - the shard retention (in hours) RetentionPeriodSeconds int `xml:"RetentionPeriodSec"` // For stream-dirs only - the shard retention (in seconds) }
type Container ¶
type Container interface { // GetContainers GetClusterMD(*GetClusterMDInput, interface{}, chan *Response) (*Request, error) // GetContainersSync GetClusterMDSync(*GetClusterMDInput) (*Response, error) // GetContainers GetContainers(*GetContainersInput, interface{}, chan *Response) (*Request, error) // GetContainersSync GetContainersSync(*GetContainersInput) (*Response, error) // GetContainers GetContainerContents(*GetContainerContentsInput, interface{}, chan *Response) (*Request, error) // GetContainerContentsSync GetContainerContentsSync(*GetContainerContentsInput) (*Response, error) // // Object // // CheckPathExists CheckPathExists(*CheckPathExistsInput, interface{}, chan *Response) (*Request, error) // CheckPathExistsSync CheckPathExistsSync(*CheckPathExistsInput) error // GetObject GetObject(*GetObjectInput, interface{}, chan *Response) (*Request, error) // GetObjectSync GetObjectSync(*GetObjectInput) (*Response, error) // PutObject PutObject(*PutObjectInput, interface{}, chan *Response) (*Request, error) // PutObjectSync PutObjectSync(*PutObjectInput) error // UpdateObjectSync UpdateObjectSync(*UpdateObjectInput) error // DeleteObject DeleteObject(*DeleteObjectInput, interface{}, chan *Response) (*Request, error) // DeleteObjectSync DeleteObjectSync(*DeleteObjectInput) error // GetItem GetItem(*GetItemInput, interface{}, chan *Response) (*Request, error) // GetItemSync GetItemSync(*GetItemInput) (*Response, error) // GetItems GetItems(*GetItemsInput, interface{}, chan *Response) (*Request, error) // GetItemSync GetItemsSync(*GetItemsInput) (*Response, error) // PutItem PutItem(*PutItemInput, interface{}, chan *Response) (*Request, error) // PutItemSync PutItemSync(*PutItemInput) (*Response, error) // PutItems PutItems(*PutItemsInput, interface{}, chan *Response) (*Request, error) // PutItemsSync PutItemsSync(*PutItemsInput) (*Response, error) // UpdateItem UpdateItem(*UpdateItemInput, interface{}, chan *Response) (*Request, error) // UpdateItemSync UpdateItemSync(*UpdateItemInput) (*Response, error) // CreateStream CreateStream(*CreateStreamInput, interface{}, chan *Response) (*Request, error) // CreateStreamSync CreateStreamSync(*CreateStreamInput) error // DescribeStream DescribeStream(*DescribeStreamInput, interface{}, chan *Response) (*Request, error) // DescribeStreamSync DescribeStreamSync(*DescribeStreamInput) (*Response, error) // DeleteStream DeleteStream(*DeleteStreamInput, interface{}, chan *Response) (*Request, error) // DeleteStreamSync DeleteStreamSync(*DeleteStreamInput) error // SeekShard SeekShard(*SeekShardInput, interface{}, chan *Response) (*Request, error) // SeekShardSync SeekShardSync(*SeekShardInput) (*Response, error) // PutRecords PutRecords(*PutRecordsInput, interface{}, chan *Response) (*Request, error) // PutRecordsSync PutRecordsSync(*PutRecordsInput) (*Response, error) // PutChunk PutChunk(*PutChunkInput, interface{}, chan *Response) (*Request, error) // PutChunkSync PutChunkSync(input *PutChunkInput) error // GetRecords GetRecords(*GetRecordsInput, interface{}, chan *Response) (*Request, error) // GetRecordsSync GetRecordsSync(*GetRecordsInput) (*Response, error) // PutOOSObject PutOOSObject(*PutOOSObjectInput, interface{}, chan *Response) (*Request, error) // PutOOSObjectSync PutOOSObjectSync(*PutOOSObjectInput) error }
A container interface allows perform actions against a container
type ContainerInfo ¶
type Containers ¶
type Containers struct { Name xml.Name `xml:"Buckets"` Containers []ContainerInfo `xml:"Bucket"` }
type Content ¶
type Content struct { Key string `xml:"Key"` Size *int `xml:"Size"` // file size in bytes LastSequenceID *int `xml:"LastSequenceId"` // greater than zero for shard files LastModified string `xml:"LastModified"` // Date in format time.RFC3339: "2019-06-02T14:30:39.18Z" Mode FileMode `xml:"Mode"` // octal (ListDir) or decimal (GetItems) base, depends on API, e.g. 33204 or 0100664 AccessTime string `xml:"AccessTime"` // Date in format time.RFC3339: "2019-06-02T14:30:39.18Z" CreatingTime string `xml:"CreatingTime"` // Date in format time.RFC3339: "2019-06-02T14:30:39.18Z" GID string `xml:"GID"` // Hexadecimal representation of GID (e.g. "3e8" -> i.e. "0x3e8" == 1000) UID string `xml:"UID"` // Hexadecimal representation of UID (e.g. "3e8" -> i.e. "0x3e8" == 1000) InodeNumber *uint32 `xml:"InodeNumber"` // iNode number }
type Context ¶
type Context interface { Container // create a new session NewSession(*NewSessionInput) (Session, error) }
type CreateStreamInput ¶
type CreateStreamInput struct { DataPlaneInput Path string ShardCount int RetentionPeriodHours int }
type CurrentChunkMetadata ¶
type CurrentChunkMetadata struct { ChunkSeqNumber uint32 `json:"ChunkSequenceNumber"` OffsetAfterJob uint64 `json:"OffsetAfterJob"` SeqNumberAfterJob uint64 `json:"SequenceNumberAfterJob"` FirstRecordTimeSec uint32 `json:"FirstRecordTimeSec"` LatestRecordTimeSec uint64 `json:"LatestRecordTimeSec"` LatestRecordTimeNSec uint64 `json:"LatestRecordTimeNSec"` }
type DataPlaneInput ¶
type DataPlaneOutput ¶
type DataPlaneOutput struct {
// contains filtered or unexported fields
}
type DeleteObjectInput ¶
type DeleteObjectInput struct { DataPlaneInput Path string }
type DeleteStreamInput ¶
type DeleteStreamInput struct { DataPlaneInput Path string }
type DescribeStreamInput ¶
type DescribeStreamInput struct { DataPlaneInput Path string }
type DescribeStreamOutput ¶
type DescribeStreamOutput struct { DataPlaneOutput ShardCount int RetentionPeriodHours int }
type DirAttributes ¶
type DirAttributes struct { Mode int `json:"mode,omitempty"` UID int `json:"uid"` GID int `json:"gid"` AtimeSec int `json:"atime.sec,omitempty"` AtimeNSec int `json:"atime.nsec"` CtimeSec int `json:"ctime.sec,omitempty"` CtimeNSec int `json:"ctime.nsec"` MtimeSec int `json:"mtime.sec,omitempty"` MtimeNSec int `json:"mtime.nsec"` }
type GetClusterMDInput ¶
type GetClusterMDInput struct {
DataPlaneInput
}
type GetClusterMDOutput ¶
type GetClusterMDOutput struct { DataPlaneOutput NumberOfVNs int }
type GetContainerContentsInput ¶
type GetContainerContentsInput struct { DataPlaneInput Path string GetAllAttributes bool // if "true" return ALL available attributes DirectoriesOnly bool // if "true" return directory entries only, otherwise return children of any kind Limit int // max number of entries per request Marker string // start from specific entry (e.g. to get next chunk) }
type GetContainerContentsOutput ¶
type GetContainerContentsOutput struct { Name string `xml:"Name"` // Bucket name NextMarker string `xml:"NextMarker"` // if not empty and isTruncated="true" - has more children (need another fetch to get them) MaxKeys string `xml:"MaxKeys"` // max number of entries in single batch Contents []Content `xml:"Contents"` // files CommonPrefixes []CommonPrefix `xml:"CommonPrefixes"` // directories IsTruncated bool `xml:"IsTruncated"` // "true" if has more content. Note, "NextMarker" should not be empty if "true" }
type GetContainersInput ¶
type GetContainersInput struct {
DataPlaneInput
}
type GetContainersOutput ¶
type GetContainersOutput struct { DataPlaneOutput XMLName xml.Name `xml:"ListBucketResult"` Owner interface{} `xml:"Owner"` Results Containers `xml:"Buckets"` }
type GetItemInput ¶
type GetItemInput struct { DataPlaneInput Path string AttributeNames []string }
type GetItemOutput ¶
type GetItemOutput struct { DataPlaneOutput Item Item }
type GetItemsInput ¶
type GetItemsInput struct { DataPlaneInput Path string TableName string AttributeNames []string Filter string Marker string ShardingKey string Limit int Segment int TotalSegments int SortKeyRangeStart string SortKeyRangeEnd string AllowObjectScatter string ReturnData string ReturnAllInodes bool DataMaxSize int RequestJSONResponse bool `json:"RequestJsonResponse"` ChokeGetItemsMS int Logger logger.Logger RetryAttempts int RetryInterval time.Duration }
type GetItemsOutput ¶
type GetItemsOutput struct { DataPlaneOutput Last bool NextMarker string Scattered bool Items []Item }
type GetObjectInput ¶
type GetRecordsInput ¶
type GetRecordsInput struct { DataPlaneInput Path string Location string Limit int }
type GetRecordsOutput ¶
type GetRecordsOutput struct { DataPlaneOutput NextLocation string MSecBehindLatest int RecordsBehindLatest int Records []GetRecordsResult }
type GetRecordsResult ¶
type ItemChunk ¶
type ItemChunk struct { Metadata *ItemChunkMetadata Data []*ItemChunkData }
type ItemChunkData ¶
type ItemChunkMetadata ¶
type ItemsCursor ¶
type ItemsCursor struct {
// contains filtered or unexported fields
}
func NewItemsCursor ¶
func NewItemsCursor(container Container, getItemsInput *GetItemsInput) (*ItemsCursor, error)
func (*ItemsCursor) GetField ¶
func (ic *ItemsCursor) GetField(name string) interface{}
func (*ItemsCursor) GetFieldInt ¶
func (ic *ItemsCursor) GetFieldInt(name string) (int, error)
func (*ItemsCursor) GetFieldString ¶
func (ic *ItemsCursor) GetFieldString(name string) (string, error)
func (*ItemsCursor) GetFields ¶
func (ic *ItemsCursor) GetFields() map[string]interface{}
func (*ItemsCursor) GetItem ¶
func (ic *ItemsCursor) GetItem() Item
func (*ItemsCursor) NextItemSync ¶
func (ic *ItemsCursor) NextItemSync() (Item, error)
NextItem gets the next matching item. this may potentially block as this lazy loads items from the collection
func (*ItemsCursor) NextSync ¶
func (ic *ItemsCursor) NextSync() bool
Next gets the next matching item. this may potentially block as this lazy loads items from the collection
func (*ItemsCursor) Release ¶
func (ic *ItemsCursor) Release()
Release releases a cursor and its underlying resources
func (*ItemsCursor) Scattered ¶
func (ic *ItemsCursor) Scattered() bool
type NewContainerInput ¶
type NewContainerInput struct {
ContainerName string
}
type NewSessionInput ¶
type PutChunkInput ¶
type PutChunkInput struct { DataPlaneInput `json:"-"` Path string `json:"-"` ChunkSeqNumber int `json:"ChunkSequenceNumber,omitempty"` Offset uint64 `json:"Offset,omitempty"` Data []byte `json:"Data,omitempty"` ChunksMetadata []*ChunkMetadata `json:"Metadata,omitempty"` CurrentChunkMetadata *CurrentChunkMetadata `json:"CurrentMetadata,omitempty"` }
type PutItemInput ¶
type PutItemInput struct { DataPlaneInput Path string Condition string Attributes map[string]interface{} UpdateMode string }
type PutItemOutput ¶
type PutItemOutput struct { DataPlaneInput MtimeSecs int MtimeNSecs int }
type PutItemsInput ¶
type PutItemsInput struct { DataPlaneInput Path string Condition string Items map[string]map[string]interface{} }
type PutItemsOutput ¶
type PutItemsOutput struct { DataPlaneOutput Success bool Errors map[string]error }
type PutOOSObjectInput ¶
type PutOOSObjectInput struct { DataPlaneInput Path string Header []byte Data [][]byte }
type PutObjectInput ¶
type PutObjectInput struct { DataPlaneInput Path string Offset int Body []byte Append bool }
type PutRecordResult ¶
type PutRecordsInput ¶
type PutRecordsInput struct { DataPlaneInput Path string Records []*StreamRecord }
type PutRecordsOutput ¶
type PutRecordsOutput struct { DataPlaneOutput FailedRecordCount int Records []PutRecordResult }
type Request ¶
type Request struct { ID uint64 // holds the input (e.g. ListBucketInput, GetItemInput) Input interface{} // a user supplied context Context interface{} // the channel to which the response must be posted ResponseChan chan *Response // pointer to container RequestResponse *RequestResponse // Request time SendTimeNanoseconds int64 }
type RequestResponse ¶
holds both a request and response
type Response ¶
type Response struct { // hold a decoded output, if any Output interface{} // Equal to the ID of request ID uint64 // holds the error for async responses Error error // a user supplied context Context interface{} // pointer to container RequestResponse *RequestResponse // HTTP HTTPResponse *fasthttp.Response }
func (*Response) HeaderPeek ¶
type SeekShardInput ¶
type SeekShardInput struct { DataPlaneInput Path string Type SeekShardInputType StartingSequenceNumber uint64 Timestamp int }
type SeekShardInputType ¶
type SeekShardInputType int
const ( SeekShardInputTypeTime SeekShardInputType = iota SeekShardInputTypeSequence SeekShardInputTypeLatest SeekShardInputTypeEarliest )
type SeekShardOutput ¶
type SeekShardOutput struct { DataPlaneOutput Location string }
type Session ¶
type Session interface { // NewContainer creates a container NewContainer(*NewContainerInput) (Container, error) }
type StreamRecord ¶
type UpdateItemInput ¶
type UpdateItemOutput ¶
type UpdateItemOutput struct { DataPlaneInput MtimeSecs int MtimeNSecs int }
type UpdateObjectInput ¶
type UpdateObjectInput struct { DataPlaneInput Path string DirAttributes *DirAttributes }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.