Documentation ¶
Overview ¶
Package sorbet implements analysis for test changepoint culprits.
Index ¶
Constants ¶
View Source
const (
// The maximum number of CL suspects to analyse.
MaxSuspectCLs = 50
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalysisRequest ¶
type AnalysisResponse ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer provides analysis on the possible culprits of a changepoint.
func NewAnalyzer ¶
func NewAnalyzer(gc GenerateClient, tvc TestVerdictClient) *Analyzer
NewAnalyzer initialises a new Analyzer.
func (*Analyzer) Analyze ¶
func (a *Analyzer) Analyze(ctx context.Context, request AnalysisRequest) (AnalysisResponse, error)
Analyze generates an analysis of the possible culprits for a given changepoint. It returns appstatus-annotated errors for client errors.
type FakeClient ¶
type FakeClient struct { // Response is the response provided to Generate requests. Response GenerateResponse }
func NewFakeClient ¶
func NewFakeClient() *FakeClient
func (*FakeClient) Generate ¶
func (c *FakeClient) Generate(ctx context.Context, prompt string) (GenerateResponse, error)
Generate generates a response for the given prompt.
type GenerateClient ¶
type GenerateClient interface {
Generate(ctx context.Context, prompt string) (GenerateResponse, error)
}
GenerateClient represents the interface used to generate analysis from a prompt.
type GenerateResponse ¶
type TestVerdictClient ¶
type TestVerdictClient interface {
ReadTestVerdictAfterPosition(ctx context.Context, options testverdicts.ReadVerdictAtOrAfterPositionOptions) (*testverdicts.SourceVerdict, error)
}
TestVerdictClient provides access to test verdicts.
Click to show internal directories.
Click to hide internal directories.