Movatterモバイル変換


[0]ホーム

URL:


dbrollup

package
v2.23.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2025 License:AGPL-3.0Imports:7Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

View Source
const (// DefaultInterval is the default time between rollups.// Rollups will be synchronized with the clock so that// they happen 13:00, 13:05, 13:10, etc.DefaultInterval = 5 *time.Minute)

Variables

This section is empty.

Functions

This section is empty.

Types

typeEvent

type Event struct {Initbool `json:"-"`TemplateUsageStatsbool `json:"template_usage_stats"`}

typeOption

type Option func(*Rolluper)

funcWithEventChannel

func WithEventChannel(ch chan<-Event)Option

WithEventChannel sets the event channel to use for rollup events.

This is only used for testing.

funcWithInterval

func WithInterval(intervaltime.Duration)Option

WithInterval sets the interval between rollups.

typeRolluper

type Rolluper struct {// contains filtered or unexported fields}

funcNew

func New(loggerslog.Logger, dbdatabase.Store, opts ...Option) *Rolluper

New creates a new DB rollup service that periodically runs rollup queries.It is the caller's responsibility to call Close on the returned instance.

This is for e.g. generating insights data (template_usage_stats) fromraw data (workspace_agent_stats, workspace_app_stats).

func (*Rolluper)Close

func (r *Rolluper) Close()error

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp