memory

package
v0.1.39 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() reportstore.Client

New constructs an empty in-memory reporting store.

Types

type Store

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

Store is an in-memory reporting persistence implementation.

func (*Store) AdoptReportRunAndContextCAS added in v0.1.23

func (s *Store) AdoptReportRunAndContextCAS(ctx context.Context, run *reportrun.Record, expectedRunRevision int64, record *reportcontext.Record, expectedContextRevision int64) error

AdoptReportRunAndContextCAS binds a completed manual snapshot and advances its active conversation pointer under one lock.

func (*Store) ClaimJob added in v0.1.23

func (s *Store) ClaimJob(_ context.Context, jobID string, startedAt time.Time) (*reportjob.Record, error)

func (*Store) CompleteJobWithArtifact added in v0.1.23

func (s *Store) CompleteJobWithArtifact(_ context.Context, jobID string, artifact *reportartifact.Record, diagnostics []byte, completedAt time.Time, retentionTTL time.Duration) (*reportjob.Record, error)

func (*Store) CreateJob

func (s *Store) CreateJob(_ context.Context, job *reportjob.Record) error

CreateJob persists a new job.

func (*Store) CreateReportRun added in v0.1.23

func (s *Store) CreateReportRun(ctx context.Context, run *reportrun.Record) error

CreateReportRun persists a new owner-scoped browser run.

func (*Store) CreateSharedArtifact

func (s *Store) CreateSharedArtifact(_ context.Context, artifact *reportshareartifact.Record) error

CreateSharedArtifact persists a new shared reporting artifact.

func (*Store) DeleteSharedArtifact added in v0.1.23

func (s *Store) DeleteSharedArtifact(_ context.Context, artifactID string) error

DeleteSharedArtifact removes a persisted shared reporting artifact.

func (*Store) FailJob added in v0.1.23

func (s *Store) FailJob(_ context.Context, jobID, errorText string, diagnostics []byte, completedAt time.Time) (*reportjob.Record, error)

func (*Store) GetArtifact

func (s *Store) GetArtifact(_ context.Context, artifactID string) (*reportartifact.Record, error)

GetArtifact loads a stored artifact.

func (*Store) GetConversationReportContext added in v0.1.23

func (s *Store) GetConversationReportContext(ctx context.Context, conversationID string) (*reportcontext.Record, error)

GetConversationReportContext loads an active pointer for the current owner.

func (*Store) GetJob

func (s *Store) GetJob(_ context.Context, jobID string) (*reportjob.Record, error)

GetJob loads a stored job.

func (*Store) GetReportRun added in v0.1.23

func (s *Store) GetReportRun(ctx context.Context, reportRunID string) (*reportrun.Record, error)

GetReportRun returns an authenticated owner's run.

func (*Store) GetReportRunByRequestID added in v0.1.23

func (s *Store) GetReportRunByRequestID(ctx context.Context, uiRunRequestID string) (*reportrun.Record, error)

GetReportRunByRequestID resolves transport retries without creating a second run.

func (*Store) GetSharedArtifact

func (s *Store) GetSharedArtifact(_ context.Context, artifactID string) (*reportshareartifact.Record, error)

GetSharedArtifact loads a stored shared reporting artifact.

func (*Store) ListArtifacts

func (s *Store) ListArtifacts(_ context.Context) ([]*reportartifact.Record, error)

ListArtifacts returns cloned stored artifacts in unspecified order.

func (*Store) ListJobs

func (s *Store) ListJobs(_ context.Context) ([]*reportjob.Record, error)

ListJobs returns cloned stored jobs in unspecified order.

func (*Store) ListSharedArtifacts

func (s *Store) ListSharedArtifacts(_ context.Context) ([]*reportshareartifact.Record, error)

ListSharedArtifacts returns cloned shared reporting artifacts in unspecified order.

func (*Store) PutArtifact

func (s *Store) PutArtifact(_ context.Context, artifact *reportartifact.Record) error

PutArtifact stores a finished artifact.

func (*Store) PutConversationReportContextCAS added in v0.1.23

func (s *Store) PutConversationReportContextCAS(ctx context.Context, record *reportcontext.Record, expectedRevision int64) error

PutConversationReportContextCAS creates revision one from expected zero, or replaces an existing pointer at its exact expected revision.

func (*Store) ReconcileRunningJobs added in v0.1.23

func (s *Store) ReconcileRunningJobs(_ context.Context, staleBefore, reconciledAt time.Time, errorText string) ([]*reportjob.Record, error)

func (*Store) SubmitJobFromRun added in v0.1.23

func (s *Store) SubmitJobFromRun(ctx context.Context, candidate *reportjob.Record) (*reportjob.Record, bool, error)

func (*Store) UpdateJob

func (s *Store) UpdateJob(_ context.Context, job *reportjob.Record) error

UpdateJob replaces a stored job.

func (*Store) UpdateReportRunCAS added in v0.1.23

func (s *Store) UpdateReportRunCAS(ctx context.Context, run *reportrun.Record, expectedRevision int64) error

UpdateReportRunCAS replaces a run only at the expected revision.

func (*Store) UpdateSharedArtifact

func (s *Store) UpdateSharedArtifact(_ context.Context, artifact *reportshareartifact.Record) error

UpdateSharedArtifact replaces a stored shared reporting artifact.

Jump to

Keyboard shortcuts

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