polarisanalyzer

package
v0.0.0-...-385b71e Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PolarisInferAPI = "/analyze"
)
View Source
const (
	RelevanceSortAPI = "/relevance/sort"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PolarisInferRes

type PolarisInferRes struct {
	InferMetricsPng string `json:"inferMetricsPng"`
	InferCause      string `json:"inferCause"`
}

type Relevance

type Relevance struct {
	ServiceNode
	Relevance float64 `json:"relevance,omitempty"`
}

type RelevanceResponse

type RelevanceResponse struct {
	SortedDescendant   []Relevance `json:"sortedDescendant"`
	UnsortedDescendant []Relevance `json:"unsortedDescendant"`
	DistanceType       string      `json:"distanceType"`
}

type Repo

type Repo interface {
	// SortDescendantByRelevance query dependency node latency correlation
	SortDescendantByRelevance(
		startTime, endTime int64, stepStr string,
		targetService, targetEndpoint string,
		unsortedDescendant []ServiceNode, sortBy string,
	) (sortResp *RelevanceResponse, err error)

	QueryPolarisInfer(req *request.GetPolarisInferRequest) (*PolarisInferRes, error)
}

func New

func New() (Repo, error)

type ServiceNode

type ServiceNode struct {
	Service  string `json:"service"`
	Endpoint string `json:"endpoint"`
	Group    string `json:"group"`
	System   string `json:"system"`
}

type SortRelevanceRequest

type SortRelevanceRequest struct {
	StartTime          int64         `json:"startTime"`
	EndTime            int64         `json:"endTime"`
	StepStr            string        `json:"stepStr"`
	Target             Target        `json:"target"`
	UnsortedDescendant []ServiceNode `json:"unsortedDescendant"`
	SortBy             string        `json:"sortBy"`
}

type Target

type Target struct {
	Service  string `json:"service"`
	Endpoint string `json:"endpoint"`
}

Jump to

Keyboard shortcuts

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