Documentation
¶
Index ¶
- Constants
- func CreateVector(ctx context.Context, engine storage.Engine, path *storage.URI, id ksuid.KSUID) error
- func DeleteVector(ctx context.Context, engine storage.Engine, path *storage.URI, id ksuid.KSUID) error
- func LookupSeekRange(ctx context.Context, engine storage.Engine, path *storage.URI, o *Object, ...) (seekindex.Range, error)
- func SequenceURI(path *storage.URI, id ksuid.KSUID) *storage.URI
- func VectorURI(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) NewReader(ctx context.Context, engine storage.Engine, path *storage.URI, ...) (*Reader, error)
- 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) SeekIndexURI(path *storage.URI) *storage.URI
- func (o Object) SequenceURI(path *storage.URI) *storage.URI
- func (o Object) Span(order order.Which) *extent.Generic
- func (o Object) String() string
- func (o Object) StringRange() string
- func (o Object) VectorURI(path *storage.URI) *storage.URI
- type Reader
- type Writer
Constants ¶
const ( DefaultSeekStride = 64 * 1024 DefaultThreshold = 500 * 1024 * 1024 )
Variables ¶
This section is empty.
Functions ¶
func CreateVector ¶ added in v1.2.0
func CreateVector(ctx context.Context, engine storage.Engine, path *storage.URI, id ksuid.KSUID) error
CreateVector writes the vectorized form of an existing Object in the VNG format.
func DeleteVector ¶ added in v1.2.0
func LookupSeekRange ¶ added in v1.3.0
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) NewReader ¶
func (o *Object) NewReader(ctx context.Context, engine storage.Engine, path *storage.URI, rg seekindex.Range) (*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.
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) SeekIndexURI ¶ added in v1.2.0
func (Object) SequenceURI ¶ added in v1.2.0
func (Object) StringRange ¶
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.