schema

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllOrder = []Order{
	OrderAsc,
	OrderDes,
}
View Source
var StepDuration = map[Step]time.Duration{
	StepSecond: time.Second,
	StepMinute: time.Minute,
	StepHour:   time.Hour,
	StepDay:    time.Hour * 24,
	StepMonth:  time.Hour * 24 * 30,
}

StepDuration is a mapping from schema.Step to its time.Duration

View Source
var StepFormats = map[Step]string{
	StepSecond: "2006-01-02 150400",
	StepMinute: "2006-01-02 1504",
	StepHour:   "2006-01-02 15",
	StepDay:    "2006-01-02",
	StepMonth:  "2006-01",
}

StepFormats is a mapping from schema.Step to its time format

Functions

This section is empty.

Types

type AlarmMessage

type AlarmMessage struct {
	StartTime int64  `json:"startTime"`
	Scope     *Scope `json:"scope"`
	ID        string `json:"id"`
	Message   string `json:"message"`
}

type AlarmTrend

type AlarmTrend struct {
	NumOfAlarm []*int `json:"numOfAlarm"`
}

type Alarms

type Alarms struct {
	Msgs  []*AlarmMessage `json:"msgs"`
	Total int             `json:"total"`
}

type Attribute

type Attribute struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type BasicTrace

type BasicTrace struct {
	SegmentID     string   `json:"segmentId"`
	EndpointNames []string `json:"endpointNames"`
	Duration      int      `json:"duration"`
	Start         string   `json:"start"`
	IsError       *bool    `json:"isError"`
	TraceIds      []string `json:"traceIds"`
}

type BatchMetricConditions

type BatchMetricConditions struct {
	Name string   `json:"name"`
	Ids  []string `json:"ids"`
}

type Call

type Call struct {
	Source           string        `json:"source"`
	SourceComponents []string      `json:"sourceComponents"`
	Target           string        `json:"target"`
	TargetComponents []string      `json:"targetComponents"`
	ID               string        `json:"id"`
	DetectPoints     []DetectPoint `json:"detectPoints"`
}

type ClusterBrief

type ClusterBrief struct {
	NumOfService  int `json:"numOfService"`
	NumOfEndpoint int `json:"numOfEndpoint"`
	NumOfDatabase int `json:"numOfDatabase"`
	NumOfCache    int `json:"numOfCache"`
	NumOfMq       int `json:"numOfMQ"`
}

type ContentType

type ContentType string
const (
	ContentTypeText ContentType = "TEXT"
	ContentTypeJSON ContentType = "JSON"
	ContentTypeNone ContentType = "NONE"
)

func (ContentType) IsValid

func (e ContentType) IsValid() bool

func (ContentType) MarshalGQL

func (e ContentType) MarshalGQL(w io.Writer)

func (ContentType) String

func (e ContentType) String() string

func (*ContentType) UnmarshalGQL

func (e *ContentType) UnmarshalGQL(v interface{}) error

type Database

type Database struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

type DetectPoint

type DetectPoint string
const (
	DetectPointClient DetectPoint = "CLIENT"
	DetectPointServer DetectPoint = "SERVER"
	DetectPointProxy  DetectPoint = "PROXY"
)

func (DetectPoint) IsValid

func (e DetectPoint) IsValid() bool

func (DetectPoint) MarshalGQL

func (e DetectPoint) MarshalGQL(w io.Writer)

func (DetectPoint) String

func (e DetectPoint) String() string

func (*DetectPoint) UnmarshalGQL

func (e *DetectPoint) UnmarshalGQL(v interface{}) error

type Duration

type Duration struct {
	Start string `json:"start"`
	End   string `json:"end"`
	Step  Step   `json:"step"`
}

type Endpoint

type Endpoint struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type EndpointInfo

type EndpointInfo struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	ServiceID   string `json:"serviceId"`
	ServiceName string `json:"serviceName"`
}

type IntValues

type IntValues struct {
	Values []*KVInt `json:"values"`
}

type KVInt

type KVInt struct {
	ID    string `json:"id"`
	Value int64  `json:"value"`
}

type KeyValue

type KeyValue struct {
	Key   string  `json:"key"`
	Value *string `json:"value"`
}

type Language

type Language string
const (
	LanguageUnknown Language = "UNKNOWN"
	LanguageJava    Language = "JAVA"
	LanguageDotnet  Language = "DOTNET"
	LanguageNodejs  Language = "NODEJS"
	LanguagePython  Language = "PYTHON"
	LanguageRuby    Language = "RUBY"
)

func (Language) IsValid

func (e Language) IsValid() bool

func (Language) MarshalGQL

func (e Language) MarshalGQL(w io.Writer)

func (Language) String

func (e Language) String() string

func (*Language) UnmarshalGQL

func (e *Language) UnmarshalGQL(v interface{}) error

type Log

type Log struct {
	ServiceName         *string     `json:"serviceName"`
	ServiceID           *string     `json:"serviceId"`
	ServiceInstanceName *string     `json:"serviceInstanceName"`
	ServiceInstanceID   *string     `json:"serviceInstanceId"`
	EndpointName        *string     `json:"endpointName"`
	EndpointID          *string     `json:"endpointId"`
	TraceID             *string     `json:"traceId"`
	Timestamp           string      `json:"timestamp"`
	IsError             *bool       `json:"isError"`
	StatusCode          *string     `json:"statusCode"`
	ContentType         ContentType `json:"contentType"`
	Content             *string     `json:"content"`
}

type LogEntity

type LogEntity struct {
	Time int64       `json:"time"`
	Data []*KeyValue `json:"data"`
}

type LogQueryCondition

type LogQueryCondition struct {
	MetricName        *string     `json:"metricName"`
	ServiceID         *string     `json:"serviceId"`
	ServiceInstanceID *string     `json:"serviceInstanceId"`
	EndpointID        *string     `json:"endpointId"`
	TraceID           *string     `json:"traceId"`
	QueryDuration     *Duration   `json:"queryDuration"`
	State             LogState    `json:"state"`
	StateCode         *string     `json:"stateCode"`
	Paging            *Pagination `json:"paging"`
}

type LogState

type LogState string
const (
	LogStateAll     LogState = "ALL"
	LogStateSuccess LogState = "SUCCESS"
	LogStateError   LogState = "ERROR"
)

func (LogState) IsValid

func (e LogState) IsValid() bool

func (LogState) MarshalGQL

func (e LogState) MarshalGQL(w io.Writer)

func (LogState) String

func (e LogState) String() string

func (*LogState) UnmarshalGQL

func (e *LogState) UnmarshalGQL(v interface{}) error

type Logs

type Logs struct {
	Logs  []*Log `json:"logs"`
	Total int    `json:"total"`
}

type MetricCondition

type MetricCondition struct {
	Name string  `json:"name"`
	ID   *string `json:"id"`
}

type Node

type Node struct {
	ID     string  `json:"id"`
	Name   string  `json:"name"`
	Type   *string `json:"type"`
	IsReal bool    `json:"isReal"`
}

type NodeType

type NodeType string
const (
	NodeTypeService  NodeType = "SERVICE"
	NodeTypeEndpoint NodeType = "ENDPOINT"
	NodeTypeUser     NodeType = "USER"
)

func (NodeType) IsValid

func (e NodeType) IsValid() bool

func (NodeType) MarshalGQL

func (e NodeType) MarshalGQL(w io.Writer)

func (NodeType) String

func (e NodeType) String() string

func (*NodeType) UnmarshalGQL

func (e *NodeType) UnmarshalGQL(v interface{}) error

type Order

type Order string
const (
	OrderAsc Order = "ASC"
	OrderDes Order = "DES"
)

func (Order) IsValid

func (e Order) IsValid() bool

func (Order) MarshalGQL

func (e Order) MarshalGQL(w io.Writer)

func (Order) String

func (e Order) String() string

func (*Order) UnmarshalGQL

func (e *Order) UnmarshalGQL(v interface{}) error

type Pagination

type Pagination struct {
	PageNum   *int  `json:"pageNum"`
	PageSize  int   `json:"pageSize"`
	NeedTotal *bool `json:"needTotal"`
}

type QueryOrder

type QueryOrder string
const (
	QueryOrderByStartTime QueryOrder = "BY_START_TIME"
	QueryOrderByDuration  QueryOrder = "BY_DURATION"
)

func (QueryOrder) IsValid

func (e QueryOrder) IsValid() bool

func (QueryOrder) MarshalGQL

func (e QueryOrder) MarshalGQL(w io.Writer)

func (QueryOrder) String

func (e QueryOrder) String() string

func (*QueryOrder) UnmarshalGQL

func (e *QueryOrder) UnmarshalGQL(v interface{}) error

type Ref

type Ref struct {
	TraceID         string  `json:"traceId"`
	ParentSegmentID string  `json:"parentSegmentId"`
	ParentSpanID    int     `json:"parentSpanId"`
	Type            RefType `json:"type"`
}

type RefType

type RefType string
const (
	RefTypeCrossProcess RefType = "CROSS_PROCESS"
	RefTypeCrossThread  RefType = "CROSS_THREAD"
)

func (RefType) IsValid

func (e RefType) IsValid() bool

func (RefType) MarshalGQL

func (e RefType) MarshalGQL(w io.Writer)

func (RefType) String

func (e RefType) String() string

func (*RefType) UnmarshalGQL

func (e *RefType) UnmarshalGQL(v interface{}) error

type Scope

type Scope string
const (
	ScopeService                 Scope = "Service"
	ScopeServiceInstance         Scope = "ServiceInstance"
	ScopeEndpoint                Scope = "Endpoint"
	ScopeServiceRelation         Scope = "ServiceRelation"
	ScopeServiceInstanceRelation Scope = "ServiceInstanceRelation"
	ScopeEndpointRelation        Scope = "EndpointRelation"
)

func (Scope) IsValid

func (e Scope) IsValid() bool

func (Scope) MarshalGQL

func (e Scope) MarshalGQL(w io.Writer)

func (Scope) String

func (e Scope) String() string

func (*Scope) UnmarshalGQL

func (e *Scope) UnmarshalGQL(v interface{}) error

type Service

type Service struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type ServiceInstance

type ServiceInstance struct {
	ID           string       `json:"id"`
	Name         string       `json:"name"`
	Attributes   []*Attribute `json:"attributes"`
	Language     Language     `json:"language"`
	InstanceUUID string       `json:"instanceUUID"`
}

type Span

type Span struct {
	TraceID      string       `json:"traceId"`
	SegmentID    string       `json:"segmentId"`
	SpanID       int          `json:"spanId"`
	ParentSpanID int          `json:"parentSpanId"`
	Refs         []*Ref       `json:"refs"`
	ServiceCode  string       `json:"serviceCode"`
	StartTime    int64        `json:"startTime"`
	EndTime      int64        `json:"endTime"`
	EndpointName *string      `json:"endpointName"`
	Type         string       `json:"type"`
	Peer         *string      `json:"peer"`
	Component    *string      `json:"component"`
	IsError      *bool        `json:"isError"`
	Layer        *string      `json:"layer"`
	Tags         []*KeyValue  `json:"tags"`
	Logs         []*LogEntity `json:"logs"`
}

type Step

type Step string
const (
	StepMonth  Step = "MONTH"
	StepDay    Step = "DAY"
	StepHour   Step = "HOUR"
	StepMinute Step = "MINUTE"
	StepSecond Step = "SECOND"
)

func (Step) IsValid

func (e Step) IsValid() bool

func (Step) MarshalGQL

func (e Step) MarshalGQL(w io.Writer)

func (Step) String

func (e Step) String() string

func (*Step) UnmarshalGQL

func (e *Step) UnmarshalGQL(v interface{}) error

type Thermodynamic

type Thermodynamic struct {
	Nodes     [][]*int `json:"nodes"`
	AxisYStep int      `json:"axisYStep"`
}

type TimeInfo

type TimeInfo struct {
	Timezone         *string `json:"timezone"`
	CurrentTimestamp *int64  `json:"currentTimestamp"`
}

type TopNEntity

type TopNEntity struct {
	Name  string `json:"name"`
	ID    string `json:"id"`
	Value int64  `json:"value"`
}

type TopNRecord

type TopNRecord struct {
	Statement *string `json:"statement"`
	Latency   int64   `json:"latency"`
	TraceID   *string `json:"traceId"`
}

type TopNRecordsCondition

type TopNRecordsCondition struct {
	ServiceID  string    `json:"serviceId"`
	MetricName string    `json:"metricName"`
	TopN       int       `json:"topN"`
	Order      Order     `json:"order"`
	Duration   *Duration `json:"duration"`
}

type Topology

type Topology struct {
	Nodes []*Node `json:"nodes"`
	Calls []*Call `json:"calls"`
}

type Trace

type Trace struct {
	Spans []*Span `json:"spans"`
}

type TraceBrief

type TraceBrief struct {
	Traces []*BasicTrace `json:"traces"`
	Total  int           `json:"total"`
}

type TraceQueryCondition

type TraceQueryCondition struct {
	ServiceID         *string     `json:"serviceId"`
	ServiceInstanceID *string     `json:"serviceInstanceId"`
	TraceID           *string     `json:"traceId"`
	EndpointID        *string     `json:"endpointId"`
	EndpointName      *string     `json:"endpointName"`
	QueryDuration     *Duration   `json:"queryDuration"`
	MinTraceDuration  *int        `json:"minTraceDuration"`
	MaxTraceDuration  *int        `json:"maxTraceDuration"`
	TraceState        TraceState  `json:"traceState"`
	QueryOrder        QueryOrder  `json:"queryOrder"`
	Paging            *Pagination `json:"paging"`
}

type TraceState

type TraceState string
const (
	TraceStateAll     TraceState = "ALL"
	TraceStateSuccess TraceState = "SUCCESS"
	TraceStateError   TraceState = "ERROR"
)

func (TraceState) IsValid

func (e TraceState) IsValid() bool

func (TraceState) MarshalGQL

func (e TraceState) MarshalGQL(w io.Writer)

func (TraceState) String

func (e TraceState) String() string

func (*TraceState) UnmarshalGQL

func (e *TraceState) UnmarshalGQL(v interface{}) error

Jump to

Keyboard shortcuts

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