You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/03/10 04:35:28 UTC
[skywalking-goapi] branch main updated: Sync data query protocol (#26)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-goapi.git
The following commit(s) were added to refs/heads/main by this push:
new 795a2b3 Sync data query protocol (#26)
795a2b3 is described below
commit 795a2b3fcdfeb2a72b061c205d8b38299d2bf8b5
Author: mrproliu <74...@qq.com>
AuthorDate: Thu Mar 10 12:28:48 2022 +0800
Sync data query protocol (#26)
---
dependencies.sh | 2 +-
query/schema.go | 82 ++++++++++++++++-----------------------------------------
2 files changed, 23 insertions(+), 61 deletions(-)
diff --git a/dependencies.sh b/dependencies.sh
index 69867f7..5df68f6 100644
--- a/dependencies.sh
+++ b/dependencies.sh
@@ -18,7 +18,7 @@
# under the License.
export COLLECT_PROTOCOL_SHA=b7548df896330bd4cd0ae42d95df9b9cc511f139
-export QUERY_PROTOCOL_SHA=d6e294735ab43b2fa9e70b11c91d85268591dec0
+export QUERY_PROTOCOL_SHA=3e31f0ec45d9500daaeda254ed0d8a6fe5cb1570
export ENVOY_SERVICE_PROTOCOL_SHA=533b32f1b390a3a88ec2008d0561e07c926d879a
export XDS_SERVICE_PROTOCOL_SHA=25de7278fc844d392d607214f36dbedf50f167ee
export PROTOC_VALIDATE_SHA=v0.6.1
diff --git a/query/schema.go b/query/schema.go
index 9b29354..37db3fb 100644
--- a/query/schema.go
+++ b/query/schema.go
@@ -94,18 +94,13 @@ type Call struct {
}
type DashboardConfiguration struct {
- Name string `json:"name"`
- Type TemplateType `json:"type"`
- Configuration string `json:"configuration"`
- Activated bool `json:"activated"`
- Disabled bool `json:"disabled"`
+ ID string `json:"id"`
+ Configuration string `json:"configuration"`
}
type DashboardSetting struct {
- Name string `json:"name"`
- Type TemplateType `json:"type"`
- Configuration string `json:"configuration"`
- Active bool `json:"active"`
+ ID string `json:"id"`
+ Configuration string `json:"configuration"`
}
type Database struct {
@@ -293,6 +288,10 @@ type MetricsValues struct {
Values *IntValues `json:"values"`
}
+type NewDashboardSetting struct {
+ Configuration string `json:"configuration"`
+}
+
type Node struct {
ID string `json:"id"`
Name string `json:"name"`
@@ -306,6 +305,19 @@ type Pagination struct {
NeedTotal *bool `json:"needTotal"`
}
+type Process struct {
+ ID string `json:"id"`
+ Name string `json:"name"`
+ ServiceID string `json:"serviceId"`
+ ServiceName string `json:"serviceName"`
+ InstanceID string `json:"instanceId"`
+ InstanceName string `json:"instanceName"`
+ Layer string `json:"layer"`
+ AgentID string `json:"agentId"`
+ DetectType string `json:"detectType"`
+ Attributes []*Attribute `json:"attributes"`
+}
+
type ProfileAnalyzation struct {
Tip *string `json:"tip"`
Trees []*ProfileStackTree `json:"trees"`
@@ -470,6 +482,7 @@ type SpanTag struct {
}
type TemplateChangeStatus struct {
+ ID string `json:"id"`
Status bool `json:"status"`
Message *string `json:"message"`
}
@@ -1087,57 +1100,6 @@ func (e Step) MarshalGQL(w io.Writer) {
fmt.Fprint(w, strconv.Quote(e.String()))
}
-type TemplateType string
-
-const (
- TemplateTypeDashboard TemplateType = "DASHBOARD"
- TemplateTypeTopologyService TemplateType = "TOPOLOGY_SERVICE"
- TemplateTypeTopologyInstance TemplateType = "TOPOLOGY_INSTANCE"
- TemplateTypeTopologyEndpoint TemplateType = "TOPOLOGY_ENDPOINT"
- TemplateTypeTopologyServiceRelation TemplateType = "TOPOLOGY_SERVICE_RELATION"
- TemplateTypeTopologyServiceInstanceRelation TemplateType = "TOPOLOGY_SERVICE_INSTANCE_RELATION"
- TemplateTypeTopologyEndpointRelation TemplateType = "TOPOLOGY_ENDPOINT_RELATION"
-)
-
-var AllTemplateType = []TemplateType{
- TemplateTypeDashboard,
- TemplateTypeTopologyService,
- TemplateTypeTopologyInstance,
- TemplateTypeTopologyEndpoint,
- TemplateTypeTopologyServiceRelation,
- TemplateTypeTopologyServiceInstanceRelation,
- TemplateTypeTopologyEndpointRelation,
-}
-
-func (e TemplateType) IsValid() bool {
- switch e {
- case TemplateTypeDashboard, TemplateTypeTopologyService, TemplateTypeTopologyInstance, TemplateTypeTopologyEndpoint, TemplateTypeTopologyServiceRelation, TemplateTypeTopologyServiceInstanceRelation, TemplateTypeTopologyEndpointRelation:
- return true
- }
- return false
-}
-
-func (e TemplateType) String() string {
- return string(e)
-}
-
-func (e *TemplateType) UnmarshalGQL(v interface{}) error {
- str, ok := v.(string)
- if !ok {
- return fmt.Errorf("enums must be strings")
- }
-
- *e = TemplateType(str)
- if !e.IsValid() {
- return fmt.Errorf("%s is not a valid TemplateType", str)
- }
- return nil
-}
-
-func (e TemplateType) MarshalGQL(w io.Writer) {
- fmt.Fprint(w, strconv.Quote(e.String()))
-}
-
type TraceState string
const (