sqlculpritstore

package
v0.0.0-...-c8d90df Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package storage implements culprit.Store using SQL.

Please see perf/sql/migrations for the database schema used.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CulpritStore

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

CulpritStore implements the culprits.Store interface.

func New

func New(db pool.Pool) (*CulpritStore, error)

New returns a new *CulpritStore.

func (*CulpritStore) AddIssueId

func (s *CulpritStore) AddIssueId(ctx context.Context, id string, issue_id string, group_id string) error

Adds issue id to a Culprit row.

func (*CulpritStore) Get

func (s *CulpritStore) Get(ctx context.Context, ids []string) ([]*pb.Culprit, error)

Returns Culprit objects corresponding to given set of ids.

func (*CulpritStore) Upsert

func (s *CulpritStore) Upsert(ctx context.Context, anomaly_group_id string, ip_commits []*pb.Commit) ([]string, error)

Inserts the given culprit elements in the persistant storage. If a culprit already exists, appends the anomaly_group_id into its corresponding field.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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