analyzer

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinFailuresForRootCause = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalysisResult

type AnalysisResult struct {
	RootCause         []string            // List of clients determined to be root cause.
	UnexplainedIssues []string            // List of issues that can't be explained by root cause.
	AffectedNodes     map[string][]string // Map of issue type to affected nodes.
	RootCauseEvidence map[string]string   // Evidence for why each root cause was determined.
}

AnalysisResult is the result of the analysis.

type AnalysisState added in v0.0.8

type AnalysisState struct {
	CLFailures       map[string]*ClientFailure
	ELFailures       map[string]*ClientFailure
	RootCauses       map[string]string // key: client name, value: evidence
	UnexplainedPairs []ClientPairWithNodes
}

type Analyzer

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

func NewAnalyzer

func NewAnalyzer(targetClient string, clientType ClientType) *Analyzer

func (*Analyzer) AddNodeStatus

func (a *Analyzer) AddNodeStatus(nodeName string, isHealthy bool)

func (*Analyzer) Analyze

func (a *Analyzer) Analyze() *AnalysisResult

type ClientFailure added in v0.0.8

type ClientFailure struct {
	Client     string
	Type       ClientType
	FailedWith []string
}

type ClientPair

type ClientPair struct {
	CLClient string
	ELClient string
}

ClientPair represents a CL-EL client combination.

func (ClientPair) String

func (cp ClientPair) String() string

String returns the string representation of a ClientPair.

type ClientPairWithNodes added in v0.0.8

type ClientPairWithNodes struct {
	Pair  ClientPair
	Nodes []string
}

type ClientType

type ClientType string

ClientType represents the type of client.

const (
	ClientTypeEL ClientType = "EL"
	ClientTypeCL ClientType = "CL"
)

type Config added in v0.0.8

type Config struct {
	Network          string
	ConsensusNode    string
	ExecutionNode    string
	DiscordChannel   string
	GrafanaToken     string
	DiscordToken     string
	OpenRouterKey    string
	GrafanaBaseURL   string
	PromDatasourceID string
	AlertUnexplained bool
}

type NodeStatus

type NodeStatus struct {
	Name      string
	IsHealthy bool
}

NodeStatus represents the status of a node.

type NodeStatusMap

type NodeStatusMap map[ClientPair][]NodeStatus

NodeStatusMap tracks the status of nodes by client pair.

Jump to

Keyboard shortcuts

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