Documentation
¶
Overview ¶
Package sessions provides session management functionality for the tracking system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBatchingSchemaLayout ¶
NewBatchingSchemaLayout creates a new layout that makes sure that all the rows from a single table will be written to the warehouse in a single call.
Types ¶
type DirectCloser ¶ added in v0.13.0
type DirectCloser struct {
// contains filtered or unexported fields
}
func NewDirectCloser ¶
func NewDirectCloser(writer SessionWriter, failureSleepDuration time.Duration) *DirectCloser
NewDirectCloser creates a new protosessions.Closer that writes the session directly to warehouse.Driver, without intermediate queue (suitable only for single-tenant setup)
type SessionWriter ¶
SessionWriter defines the interface for writing sessions
func NewNoopWriter ¶ added in v0.13.0
func NewNoopWriter() SessionWriter
NewNoopWriter creates a new NoopWriter
func NewSessionWriter ¶
func NewSessionWriter( parentCtx context.Context, whr warehouse.Registry, columnsRegistry schema.ColumnsRegistry, layouts schema.LayoutRegistry, splitterRegistry splitter.Registry, opts ...SessionWriterOption, ) SessionWriter
NewSessionWriter creates a new SessionWriter with the provided warehouse, column sources, and layout sources. It caches each entity (warehouse, columns, layout) for 5 minutes.
type SessionWriterOption ¶ added in v0.13.0
type SessionWriterOption func(*sessionWriterImpl)
SessionWriterOption configures the SessionWriter.
func WithCacheTTL ¶ added in v0.13.0
func WithCacheTTL(d time.Duration) SessionWriterOption
WithCacheTTL sets the TTL for cached registries.
func WithConcurrency ¶ added in v0.13.0
func WithConcurrency(n int) SessionWriterOption
WithConcurrency sets the concurrency limit for parallel writes.
func WithWriteTimeout ¶ added in v0.13.0
func WithWriteTimeout(d time.Duration) SessionWriterOption
WithWriteTimeout sets the timeout for individual write operations.