Versions in this module Expand all Collapse all v0 v0.1.1 Aug 24, 2023 v0.1.0 Aug 9, 2023 Changes in this version + var ErrNoLogRecords = errors.New("process has no records") + func HashProfile(processID format.UUID, profileType string, timeRange TimeRange) format.Hash + type Compression = types.Compression + const Snappy + const Uncompressed + const Zstd + type LogReader struct + func NewLogReader(input io.ReadSeeker, manifest *format.Manifest) *LogReader + func (r *LogReader) Close() error + func (r *LogReader) ReadRecordBatch() (*RecordBatch, error) + func (r *LogReader) Seek(offset int64, whence int) (int64, error) + type LogRecordReader struct + func NewLogRecordReader(r *LogReader) *LogRecordReader + func (r *LogRecordReader) Read(records []Record) (int, error) + func (r *LogRecordReader) Seek(offset int64, whence int) (int64, error) + type LogRecordWriter struct + func NewLogRecordWriter(w *LogWriter, batchSize int, compression Compression) *LogRecordWriter + func (w *LogRecordWriter) Flush() error + func (w *LogRecordWriter) WriteRecord(record *RecordBuilder) error + type LogWriter struct + func NewLogWriter(output io.Writer) *LogWriter + func (w *LogWriter) Reset(output io.Writer) + func (w *LogWriter) WriteRecordBatch(batch *RecordBatchBuilder) error + type Record struct + FunctionCall []byte + FunctionID int + Offset int64 + Time time.Time + type RecordBatch struct + func (b *RecordBatch) CompressedSize() int64 + func (b *RecordBatch) Compression() Compression + func (b *RecordBatch) FirstOffset() int64 + func (b *RecordBatch) FirstTimestamp() time.Time + func (b *RecordBatch) LastTimestamp() time.Time + func (b *RecordBatch) NextOffset() int64 + func (b *RecordBatch) NumRecords() int + func (b *RecordBatch) Read(records []Record) (int, error) + func (b *RecordBatch) Reset(startTime time.Time, buf []byte, reader io.Reader) + func (b *RecordBatch) UncompressedSize() int64 + type RecordBatchBuilder struct + func (b *RecordBatchBuilder) AddRecord(record *RecordBuilder) + func (b *RecordBatchBuilder) Bytes() []byte + func (b *RecordBatchBuilder) Reset(compression Compression, firstOffset int64) + func (b *RecordBatchBuilder) Write(w io.Writer) (int, error) + type RecordBuilder struct + func (b *RecordBuilder) Bytes() []byte + func (b *RecordBuilder) Reset(startTime time.Time) + func (b *RecordBuilder) SetFunctionCall(functionCall []byte) + func (b *RecordBuilder) SetFunctionID(id int) + func (b *RecordBuilder) SetTimestamp(t time.Time) + func (b *RecordBuilder) Write(w io.Writer) (int, error) + type Registry struct + CreateTags []object.Tag + SelectTags []object.Tag + Store object.Store + func (reg *Registry) CreateConfig(ctx context.Context, config *format.Config, tags ...object.Tag) (*format.Descriptor, error) + func (reg *Registry) CreateLogManifest(ctx context.Context, processID format.UUID, manifest *format.Manifest) error + func (reg *Registry) CreateLogSegment(ctx context.Context, processID format.UUID, segmentNumber int) (io.WriteCloser, error) + func (reg *Registry) CreateModule(ctx context.Context, module *format.Module, tags ...object.Tag) (*format.Descriptor, error) + func (reg *Registry) CreateProcess(ctx context.Context, process *format.Process, tags ...object.Tag) (*format.Descriptor, error) + func (reg *Registry) CreateProfile(ctx context.Context, processID format.UUID, profileType string, ...) (*format.Descriptor, error) + func (reg *Registry) CreateRuntime(ctx context.Context, runtime *format.Runtime, tags ...object.Tag) (*format.Descriptor, error) + func (reg *Registry) ListConfigs(ctx context.Context, timeRange TimeRange, tags ...object.Tag) stream.ReadCloser[*format.Descriptor] + func (reg *Registry) ListLogManifests(ctx context.Context) stream.ReadCloser[*format.Manifest] + func (reg *Registry) ListLogSegments(ctx context.Context, processID format.UUID) stream.ReadCloser[format.LogSegment] + func (reg *Registry) ListModules(ctx context.Context, timeRange TimeRange, tags ...object.Tag) stream.ReadCloser[*format.Descriptor] + func (reg *Registry) ListProcesses(ctx context.Context, timeRange TimeRange, tags ...object.Tag) stream.ReadCloser[*format.Descriptor] + func (reg *Registry) ListRecords(ctx context.Context, processID format.UUID, timeRange TimeRange) stream.ReadCloser[Record] + func (reg *Registry) ListResources(ctx context.Context, mediaType format.MediaType, timeRange TimeRange, ...) stream.ReadCloser[*format.Descriptor] + func (reg *Registry) ListRuntimes(ctx context.Context, timeRange TimeRange, tags ...object.Tag) stream.ReadCloser[*format.Descriptor] + func (reg *Registry) LookupConfig(ctx context.Context, hash format.Hash) (*format.Config, error) + func (reg *Registry) LookupDescriptor(ctx context.Context, hash format.Hash) (*format.Descriptor, error) + func (reg *Registry) LookupLogManifest(ctx context.Context, processID format.UUID) (*format.Manifest, error) + func (reg *Registry) LookupModule(ctx context.Context, hash format.Hash) (*format.Module, error) + func (reg *Registry) LookupProcess(ctx context.Context, hash format.Hash) (*format.Process, error) + func (reg *Registry) LookupProfile(ctx context.Context, hash format.Hash) (*profile.Profile, error) + func (reg *Registry) LookupRecord(ctx context.Context, process *format.Manifest, offset int64) (Record, error) + func (reg *Registry) LookupResource(ctx context.Context, hash format.Hash) (io.ReadSeekCloser, error) + func (reg *Registry) LookupRuntime(ctx context.Context, hash format.Hash) (*format.Runtime, error) + func (reg *Registry) ReadLogSegment(ctx context.Context, processID format.UUID, segmentNumber int) (io.ReadSeekCloser, error) + type TimeRange struct + End time.Time + Start time.Time + func Between(then, now time.Time) TimeRange + func Since(then time.Time) TimeRange + func Until(now time.Time) TimeRange + func (tr TimeRange) Duration() time.Duration