Documentation
¶
Index ¶
- Constants
- func RowObjectName(id ksuid.KSUID) string
- func RowObjectPath(path *storage.URI, id ksuid.KSUID) *storage.URI
- type FileKind
- type Meta
- type Object
- func (o *Object) Equal(to *Object) bool
- func (o Object) IsZero() bool
- func (o *Object) NewWriter(ctx context.Context, engine storage.Engine, path *storage.URI, ...) (*Writer, error)
- func (o Object) ObjectPrefix(path *storage.URI) *storage.URI
- func (o Object) Range() string
- func (o Object) Remove(ctx context.Context, engine storage.Engine, path *storage.URI) error
- func (o Object) RowObjectName() string
- func (o Object) RowObjectPath(path *storage.URI) *storage.URI
- func (o Object) SeekObjectName() string
- func (o Object) SeekObjectPath(path *storage.URI) *storage.URI
- func (o Object) Span(order order.Which) *extent.Generic
- func (o Object) String() string
- func (o Object) StringRange() string
- type ObjectScan
- type Reader
- type Writer
Constants ¶
const ( DefaultSeekStride = 64 * 1024 DefaultThreshold = 500 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func RowObjectName ¶
Types ¶
type FileKind ¶
type FileKind string
A FileKind is the first part of a file name, used to differentiate files when they are listed from the archive's backing store.
func (FileKind) Description ¶
type Object ¶
func (*Object) NewWriter ¶
func (o *Object) NewWriter(ctx context.Context, engine storage.Engine, path *storage.URI, order order.Which, poolKey field.Path, seekIndexStride int) (*Writer, error)
NewWriter returns a writer for writing the data of a zng-row storage object as well as optionally creating a seek index for the row object when the seekIndexStride is non-zero. We assume all records are non-volatile until Close as zed.Values from the various record bodies are referenced across calls to Write.
func (Object) ObjectPrefix ¶
ObjectPrefix returns a prefix for the various objects that comprise a data object so they can all be deleted with the storage engine's DeleteByPrefix method.
func (Object) Remove ¶
Remove deletes the row object and its seek index. Any 'not found' errors are ignored.
func (Object) RowObjectName ¶
func (Object) SeekObjectName ¶
func (Object) StringRange ¶
type ObjectScan ¶ added in v1.0.0
func NewObjectScan ¶ added in v1.0.0
func NewObjectScan(o Object) *ObjectScan
func (*ObjectScan) NewReader ¶ added in v1.0.0
func (o *ObjectScan) NewReader(ctx context.Context, engine storage.Engine, path *storage.URI, scanRange extent.Span, cmp expr.CompareFn) (*Reader, error)
NewReader returns a Reader for this data object. If the object has a seek index and if the provided span skips part of the object, the seek index will be used to limit the reading window of the returned reader.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is a zio.Writer that writes a stream of sorted records into a data object.
func (*Writer) Abort ¶
func (w *Writer) Abort()
Abort is called when an error occurs during write. Errors are ignored because the write error will be more informative and should be returned.
func (*Writer) BytesWritten ¶
func (*Writer) Object ¶
Object returns the Object written by the writer. This is only valid after Close() has returned a nil error.