Documentation
¶
Overview ¶
Package logs defines types used for the data object logs section. The logs section holds a list of log records across multiple streams.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logs ¶
type Logs struct {
// contains filtered or unexported fields
}
Logs accumulate a set of [Record]s within a data object.
func New ¶
Nwe creates a new Logs section. The pageSize argument specifies how large pages should be.
func (*Logs) EncodeTo ¶
EncodeTo encodes the set of logs to the provided encoder. Before encoding, log records are sorted by StreamID and Timestamp.
EncodeTo may generate multiple sections if the list of log records is too big to fit into a single section.
Logs.Reset is invoked after encoding, even if encoding fails.
func (*Logs) EstimatedSize ¶
EstimatedSize returns the estimated size of the Logs section in bytes.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics instruments the logs section.
func NewMetrics ¶
func NewMetrics() *Metrics
NewMetrics creates a new set of metrics for the logs section.
func (*Metrics) Register ¶
func (m *Metrics) Register(reg prometheus.Registerer) error
Register registers metrics to report to reg.
func (*Metrics) Unregister ¶
func (m *Metrics) Unregister(reg prometheus.Registerer)
Unregister unregisters metrics from the provided Registerer.
type Options ¶
type Options struct { // PageSizeHint is the size of pages to use when encoding the logs section. PageSizeHint int // BufferSize is the size of the buffer to use when accumulating log records. BufferSize int // SectionSizeHint is the size of the section to use when encoding the logs // section. If the section size is exceeded, multiple sections will be // created. SectionSize int }
Options configures the behavior of the logs section.