提交 5567e865 编写于 作者: 彭勇升 pengys 提交者: wu-sheng

Update aggregation.graphqls (#6)

* Update aggregation.graphqls

Split getTopN into multiple methods, with each scope as a separate method.

* Update aggregation.graphqls

Add order parameter and add 2 methods for all query.
上级 f2e54c2c
......@@ -14,23 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Match the metric by name, order by metric value(such as: avg, percent)
input TopNCondition {
name: String!
topN: Int!
order: Order!
# When the scope is ServiceInstance or Endpoint,
# most likely you need a secondary filter.
# Such as:
# 1. Get topN service instance in a given service id
# 2. Get topN endpoint in a given serivce id.
# Backend will decide the filter id meaning by Scope.
#
# Defintely, it is not required by default.
filterScope: Scope
filterId: ID
}
type TopNEntity {
name: String!
id: ID!
......@@ -41,5 +24,9 @@ type TopNEntity {
# All aggregation queries require backend or/and storage do aggregation in query time.
extend type Query {
# TopN is an aggregation query.
getTopN(condition: TopNCondition!, duration: Duration!): [TopNEntity!]!
getServiceTopN(name: String!, topN: Int!, duration: Duration!, order: Order!): [TopNEntity!]!
getAllServiceInstanceTopN(name: String!, topN: Int!, duration: Duration!, order: Order!): [TopNEntity!]!
getServiceInstanceTopN(serviceId Int!, name: String!, topN: Int!, duration: Duration!, order: Order!): [TopNEntity!]!
getAllEndpointTopN(name: String!, topN: Int!, duration: Duration!, order: Order!): [TopNEntity!]!
getEndpointTopN(serviceId Int!, name: String!, topN: Int!, duration: Duration!, order: Order!): [TopNEntity!]!
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册