|
17 | 17 |
|
18 | 18 | package discovery |
19 | 19 |
|
| 20 | +import "fmt" |
| 21 | + |
20 | 22 | const ( |
21 | 23 | MS_UP string = "UP" |
22 | 24 | MS_DOWN string = "DOWN" |
@@ -105,14 +107,16 @@ type GetServicesInfoResponse struct { |
105 | 107 |
|
106 | 108 | type MicroServiceKey struct { |
107 | 109 | // Tenant: The format is "{domain}/{project}" |
108 | | - Tenant string `protobuf:"bytes,1,opt,name=tenant" json:"tenant,omitempty"` |
109 | | - // Deprecated: Use Tenant instead |
110 | | - Project string `protobuf:"bytes,2,opt,name=project" json:"project,omitempty"` |
| 110 | + Tenant string `protobuf:"bytes,1,opt,name=tenant" json:"tenant,omitempty"` |
| 111 | + Environment string `protobuf:"bytes,2,opt,name=environment" json:"environment,omitempty"` |
111 | 112 | AppId string `protobuf:"bytes,3,opt,name=appId" json:"appId,omitempty"` |
112 | 113 | ServiceName string `protobuf:"bytes,4,opt,name=serviceName" json:"serviceName,omitempty"` |
113 | | - Version string `protobuf:"bytes,5,opt,name=version" json:"version,omitempty"` |
114 | | - Environment string `protobuf:"bytes,6,opt,name=environment" json:"environment,omitempty"` |
115 | | - Alias string `protobuf:"bytes,7,opt,name=alias" json:"alias,omitempty"` |
| 114 | + Alias string `protobuf:"bytes,5,opt,name=alias" json:"alias,omitempty"` |
| 115 | + Version string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"` |
| 116 | +} |
| 117 | + |
| 118 | +func (mk *MicroServiceKey) String() string { |
| 119 | + return fmt.Sprintf("&{%v %v %v %v %v %v}", mk.Tenant, mk.Environment, mk.AppId, mk.ServiceName, mk.Alias, mk.Version) |
116 | 120 | } |
117 | 121 |
|
118 | 122 | type FrameWorkProperty struct { |
@@ -363,6 +367,10 @@ type ConsumerDependency struct { |
363 | 367 | Override bool `protobuf:"varint,3,opt,name=override" json:"override,omitempty"` |
364 | 368 | } |
365 | 369 |
|
| 370 | +func (cd *ConsumerDependency) String() string { |
| 371 | + return fmt.Sprintf("&{%v %v %v}", cd.Consumer, cd.Providers, cd.Override) |
| 372 | +} |
| 373 | + |
366 | 374 | type CreateDependenciesResponse struct { |
367 | 375 | Response *Response `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"` |
368 | 376 | } |
@@ -430,3 +438,12 @@ type MicroServiceDependency struct { |
430 | 438 | type BatchGetInstancesRequest struct { |
431 | 439 | ServiceIds []string `json:"serviceIds,omitempty"` |
432 | 440 | } |
| 441 | + |
| 442 | +type GetServiceCountRequest struct { |
| 443 | + Domain string `protobuf:"bytes,1,opt,name=domain" json:"domain,omitempty"` |
| 444 | + Project string `protobuf:"bytes,2,opt,name=project" json:"project,omitempty"` |
| 445 | +} |
| 446 | +type GetServiceCountResponse struct { |
| 447 | + Response *Response `protobuf:"bytes,1,opt,name=response" json:"response,omitempty"` |
| 448 | + Count int64 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"` |
| 449 | +} |
0 commit comments