analyzers

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ShareAnalyzerFactory = &AnalyzerFactory{
	generators: make(map[DeliveryType]func() *DAGAnalyzer, 10),
}

Functions

func GeneratePodCreateDAG

func GeneratePodCreateDAG() modules.DeliveryModule

用于构建pod创建链路DAG

func GeneratePodUpgradeDAG

func GeneratePodUpgradeDAG() modules.DeliveryModule

GeneratePodUpgradeDAG 用于构建pod升级链路DAG

Types

type AnalyzerFactory

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

func (*AnalyzerFactory) GetAnalyzerByType

func (a *AnalyzerFactory) GetAnalyzerByType(deliveryType DeliveryType) *DAGAnalyzer

func (*AnalyzerFactory) Register

func (a *AnalyzerFactory) Register(deliveryType DeliveryType, generator func() *DAGAnalyzer)

type DAGAnalyzer

type DAGAnalyzer struct {
	AuditEvents []*shares.AuditEvent
	BeginTime   *time.Time
	EndTime     *time.Time

	Spans []*spans.Span
	// contains filtered or unexported fields
}

func GeneratePodCreateAnalyzer

func GeneratePodCreateAnalyzer() *DAGAnalyzer

func GeneratePodUpgradeAnalyzer

func GeneratePodUpgradeAnalyzer() *DAGAnalyzer

func NewDAGAnalyzer

func NewDAGAnalyzer(deliveryType DeliveryType, deliveryModule modules.DeliveryModule, maxSpanFunc func(spans []*spans.Span, events []*shares.AuditEvent, curTime *time.Time) string) *DAGAnalyzer

func (*DAGAnalyzer) Analysis

func (a *DAGAnalyzer) Analysis(cluster string, podName string, podUid string) *share.ReasonResult

func (*DAGAnalyzer) GetResult

func (a *DAGAnalyzer) GetResult() *share.ReasonResult

func (*DAGAnalyzer) PrintHyperEvent

func (a *DAGAnalyzer) PrintHyperEvent()

func (*DAGAnalyzer) PrintMaxSpan

func (a *DAGAnalyzer) PrintMaxSpan()

func (*DAGAnalyzer) StartAnalysis

func (a *DAGAnalyzer) StartAnalysis()

type DeliveryType

type DeliveryType string
const (
	PodCreate  DeliveryType = "PodCreate"
	PodDelete  DeliveryType = "PodDelete"
	PodUpgrade DeliveryType = "PodUpgrade"
)

type SpanType

type SpanType string
var (
	DEFAULT_SCHEDULE_SPAN SpanType = "default_schedule_span"
	//使用Schedule代替
	SCHEDULE_SPAN SpanType = "schedule_span"

	IP_ALLOCATE_SPAN      SpanType = "ip_allocate_span"
	KUBELET_DELAY_SPAN    SpanType = "kubelet_delay_span"
	VOLUE_MOUNT_SPAN      SpanType = "volume_mount_span"
	VOLUE_ATTACH_SPAN     SpanType = "volume_attach_span"
	SANDBOX_CREATE_SPAN   SpanType = "sandbox_create_span"
	IMAGE_PULL_SPAN       SpanType = "image_pull_span"
	CONTAINER_CREATE_SPAN SpanType = "container_create_span"
	CONTAINER_START_SPAN  SpanType = "container_start_span"
	POSTSTART_HOOK_SPAN   SpanType = "container_poststart_span"
	POD_INITIAL_SPAN      SpanType = "pod_init_span"
	CONTIANER_READY_SPAN  SpanType = "container_readiness_span"
	POD_READY_SPAN        SpanType = "pod_readiness_span"
)

Jump to

Keyboard shortcuts

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