Skip to content

Commit

Permalink
Add ServiceInstanceTopology & ServiceInstanceNode (#20)
Browse files Browse the repository at this point in the history
* add ServiceInstanceNode
* Update topology.graphqls
* Fix typo
  • Loading branch information
arugal authored and wu-sheng committed Dec 2, 2019
1 parent d787ffe commit e47462f
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion topology.graphqls
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ type Topology {
calls: [Call!]!
}

# The instance topology based on the given serviceIds
type ServiceInstanceTopology {
nodes: [ServiceInstanceNode!]!
calls: [Call!]!
}

# Node in Topology
type Node {
# The global id of each node,
Expand All @@ -36,6 +42,24 @@ type Node {
isReal: Boolean!
}

# Node in ServiceInstanceTopology
type ServiceInstanceNode {
# The instance id of each node,
id: ID!
# The literal name of the #id.
name: String!
# Service id
serviceId: ID!
# The literal name of the #serviceId.
serviceName: String!
# The type name may be
# 1. The service provider/middleware tech, such as: Tomcat, SpringMVC
# 2. Conjectural Service, e.g. MySQL, Redis, Kafka
type: String
# It is a conjuecture node or real node, to represent an instance.
isReal: Boolean!
}

# The Call represents a directed distributed call,
# from the `source` to the `target`.
type Call {
Expand Down Expand Up @@ -63,7 +87,7 @@ extend type Query {
# Query the topology, based on the given service
getServiceTopology(serviceId: ID!, duration: Duration!): Topology
# Query the instance topology, based on the given clientServiceId and serverServiceId
getServiceInstanceTopology(clientServiceId: ID!, serverServiceId: ID!, duration: Duration!): Topology
getServiceInstanceTopology(clientServiceId: ID!, serverServiceId: ID!, duration: Duration!): ServiceInstanceTopology
# Query the topology, based on the given endpoint
getEndpointTopology(endpointId: ID!, duration: Duration!): Topology
}

0 comments on commit e47462f

Please sign in to comment.