Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository implements logbuf.Repository
func NewRepository ¶
func NewRepository(db *sql.DB) Repository
func (Repository) DeleteTraces ¶
func (r Repository) DeleteTraces(ctx context.Context, threshold time.Duration) (pruned []trace.TraceID, err error)
DeleteTraces removes all trace.TraceID from the database that are older than the threshold time.Duration (which is calculated from the current time minus this value). It returns a slice of trace.TraceID with all values that are were removed and an error if raised.
func (Repository) InsertTrace ¶
InsertTrace adds the input trace.TraceID to the database if it does not yet exist, alongside with the current timestamp (of when it is registered). Returns an error if raised.
Click to show internal directories.
Click to hide internal directories.