readmodels

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FreshnessWindow

func FreshnessWindow(cfg RefreshConfig, kind string) time.Duration

func WithRefreshConfig

func WithRefreshConfig(ctx context.Context, cfg RefreshConfig) context.Context

Types

type Projector

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

func NewProjector

func NewProjector(pool *pgxpool.Pool, q *gen.Queries, cfg RefreshConfig) *Projector

func ProjectorFromContext

func ProjectorFromContext(ctx context.Context, q *gen.Queries) *Projector

func (*Projector) RebuildAllReadModels

func (p *Projector) RebuildAllReadModels(ctx context.Context) error

func (*Projector) RefreshAppAssetSource

func (p *Projector) RefreshAppAssetSource(ctx context.Context, sourceKind, sourceName string) error

func (*Projector) RefreshConnectorSourceState

func (p *Projector) RefreshConnectorSourceState(ctx context.Context) error

func (*Projector) RefreshDiscoverySource

func (p *Projector) RefreshDiscoverySource(ctx context.Context, sourceKind, sourceName string) error

func (*Projector) RefreshNonHumanPrincipalSourceReadModels

func (p *Projector) RefreshNonHumanPrincipalSourceReadModels(ctx context.Context, sourceKind, sourceName string) error

func (*Projector) StoredReadModelsNeedRebuild

func (p *Projector) StoredReadModelsNeedRebuild(ctx context.Context) (bool, error)

type RefreshConfig

type RefreshConfig struct {
	SyncInterval                time.Duration
	SyncOktaInterval            time.Duration
	SyncEntraInterval           time.Duration
	SyncGoogleWorkspaceInterval time.Duration
	SyncGitHubInterval          time.Duration
	SyncDatadogInterval         time.Duration
	SyncAWSInterval             time.Duration
}

RefreshConfig carries only the sync interval overrides needed to compute connector freshness windows for read-model refreshes.

func RefreshConfigFromConfig

func RefreshConfigFromConfig(cfg config.Config) RefreshConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL