[fix] Update docs (#1386)
diff --git a/docs/conf.py b/docs/conf.py
index a64db03..17299b8 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -98,9 +98,9 @@
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
-html_static_path = ['_static']
+html_static_path = []
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
-html_logo = 'img/logo.svg'
+html_logo = 'logo.png'
html_theme_options = {
'logo_only': True,
'display_version': False,
diff --git a/docs/design-guides/design.rst b/docs/design-guides/design.rst
index 2dd0a20..bf832ba 100644
--- a/docs/design-guides/design.rst
+++ b/docs/design-guides/design.rst
@@ -1,8 +1,5 @@
-Design Guides
-=============
-
Service-Center Design
----------------------
+=============
Service-Center(SC) is a service registry that allows services to
register their instance information and to discover providers of a given
@@ -45,8 +42,8 @@
.. image:: onStartup.PNG
-Communication between Consumer -> Provider
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Communication
+^^^^^^^^^^^^^
Once the bootup is successful then the consumer can communicate with
providers flawlessly, below is the diagram illustrating the
@@ -67,4 +64,433 @@
Note: Feel free to contribute to this document.
.. _java-chassis: https://github.com/ServiceComb/java-chassis
-.. _go-chassis: https://github.com/go-chassis/go-chassis
\ No newline at end of file
+.. _go-chassis: https://github.com/go-chassis/go-chassis
+
+
+Storage structure
+^^^^^^^^^^^^^^^^^
+
+Backend kind is ETCD
+
+.. code:: yaml
+
+ # services
+ # /cse-sr/ms/files/{domain}/{project}/{serviceId}
+ /cse-sr/ms/files/default/default/7062417bf9ebd4c646bb23059003cea42180894a:
+ {
+ "serviceId": "7062417bf9ebd4c646bb23059003cea42180894a",
+ "appId": "default",
+ "serviceName": "SERVICECENTER",
+ "description": "A default service",
+ "version": "0.0.1",
+ "level": "BACK",
+ "schemas": [
+ "firstSchema",
+ "secondSchema"
+ ],
+ "paths": [{
+ "path": "/opt/tomcat/webapp",
+ "property": {
+ "allowCrossApp": "true"
+ }
+ }],
+ "status": "UP",
+ "properties": {
+ "allowCrossApp": "true"
+ },
+ "timestamp": "1592570701",
+ "framework": {
+ "name": "UNKNOWN",
+ "version": "0.0.1"
+ },
+ "alias": "SERVICECENTER",
+ "modTimestamp": "1592570701",
+ "environment": "development"
+ }
+
+ # /cse-sr/ms/indexes/{domain}/{project}/{environment}/{appId}/{serviceName}/{serviceVersion}
+ /cse-sr/ms/indexes/default/default/development/default/SERVICECENTER/0.0.1:
+ "7062417bf9ebd4c646bb23059003cea42180894a"
+
+ # /cse-sr/ms/alias/{domain}/{project}/{environment}/{appId}/{serviceName}/{serviceVersion}
+ /cse-sr/ms/alias/default/default/development/default/SERVICECENTER/0.0.1:
+ "7062417bf9ebd4c646bb23059003cea42180894a"
+
+ # instances
+ # /cse-sr/inst/files/{domain}/{project}/{serviceId}/{instanceId}
+ /cse-sr/inst/files/default/default/7062417bf9ebd4c646bb23059003cea42180894a/b0ffb9feb22a11eaa76a08002706c83e:
+ {
+ "instanceId": "b0ffb9feb22a11eaa76a08002706c83e",
+ "serviceId": "7062417bf9ebd4c646bb23059003cea42180894a",
+ "endpoints": ["rest://127.0.0.1:30100/"],
+ "hostName": "tian-VirtualBox",
+ "status": "UP",
+ "healthCheck": {
+ "mode": "push",
+ "interval": 30,
+ "times": 3
+ },
+ "timestamp": "1592570701",
+ "modTimestamp": "1592570701",
+ "version": "0.0.1"
+ }
+
+ # /cse-sr/inst/leases/{domain}/{project}/{serviceId}/{instanceId}
+ /cse-sr/inst/leases/default/default/7062417bf9ebd4c646bb23059003cea42180894a/b0ffb9feb22a11eaa76a08002706c83e:
+ "leaseId"
+
+ # schemas
+ # /cse-sr/ms/schemas/{domain}/{project}/{serviceId}/{schemaId}
+ /cse-sr/ms/schemas/default/default/7062417bf9ebd4c646bb23059003cea42180894a/first-schema:
+ "schema"
+
+ # /cse-sr/ms/schema-sum/{domain}/{project}/{serviceId}/{schemaId}
+ /cse-sr/ms/schema-sum/default/default/7062417bf9ebd4c646bb23059003cea42180894a/first-schema:
+ "schemaSummary"
+
+ # dependencies
+ # /cse-sr/ms/dep-queue/{domain}/{project}/{serviceId}/{uuid}
+ /cse-sr/ms/dep-queue/default/default/7062417bf9ebd4c646bb23059003cea42180894a/0:
+ {
+ "consumer": {
+ "tenant": "default/default",
+ "project": "project",
+ "appId": "appId",
+ "serviceName": "ServiceCenter",
+ "version": "0.0.1",
+ "environment": "development",
+ "alias": "serviceCenter"
+ },
+ "providers": [{
+ "tenant": "default/default",
+ "project": "project",
+ "appId": "appId",
+ "serviceName": "ServiceCenterProvider",
+ "version": "0.0.2",
+ "environment": "development",
+ "alias": "serviceCenterProvider"
+ }],
+ "override": true
+ }
+
+ # tags
+ # /cse-sr/ms/tags/{domain}/{project}/{serviceId}
+ /cse-sr/ms/tags/default/default/7062417bf9ebd4c646bb23059003cea42180894a:
+ {
+ "a": "1"
+ }
+
+ # rules
+ # /cse-sr/ms/rules/{domain}/{project}/{serviceId}/{ruleId}
+ /cse-sr/ms/rules/default/default/7062417bf9ebd4c646bb23059003cea42180894a/Deny:
+ {
+ "ruleId": "Deny",
+ "attribute": "denylist",
+ "pattern": "Test*",
+ "description": "test BLACK"
+ }
+
+ # /cse-sr/ms/rule-indexes/{domain}/{project}/{serviceId}/{attribute}/{pattern}
+ /cse-sr/ms/rule-indexes/default/default/7062417bf9ebd4c646bb23059003cea42180894a/denylist/Test:
+ "ruleId"
+
+ # auth
+ # /cse-sr/accounts/{accountName}
+ /cse-sr/accounts/Alice:
+ {
+ "_id": "xxx",
+ "account": "account_name",
+ "password": "password",
+ "role": "admin",
+ "tokenExpirationTime": "1500519927",
+ "currentPassword": "password",
+ "status": "normal"
+ }
+ # record role binding to account
+ /cse-sr/idx-role-account/{role}/{account}:
+ {no value}
+ # domain
+ # /cse-sr/domains/{domain}
+ /cse-sr/domains/default:
+
+ # project
+ # /cse-sr/domains/{domain}/{project}
+ /cse-sr/projects/default/default:
+
+Backend kind is Mongo
+
+.. code:: yaml
+
+ #type Service struct {
+ # Domain string `json:"domain,omitempty"`
+ # Project string `json:"project,omitempty"`
+ # Tags map[string]string `json:"tags,omitempty"`
+ # Service *pb.MicroService `json:"service,omitempty"`
+ #}
+
+ #type MicroService struct {
+ # ServiceId string `protobuf:"bytes,1,opt,name=serviceId" json:"serviceId,omitempty" bson:"service_id"`
+ # AppId string `protobuf:"bytes,2,opt,name=appId" json:"appId,omitempty" bson:"app"`
+ # ServiceName string `protobuf:"bytes,3,opt,name=serviceName" json:"serviceName,omitempty" bson:"service_name"`
+ # Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
+ # Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
+ # Level string `protobuf:"bytes,6,opt,name=level" json:"level,omitempty"`
+ # Schemas []string `protobuf:"bytes,7,rep,name=schemas" json:"schemas,omitempty"`
+ # Paths []*ServicePath `protobuf:"bytes,10,rep,name=paths" json:"paths,omitempty"`
+ # Status string `protobuf:"bytes,8,opt,name=status" json:"status,omitempty"`
+ # Properties map[string]string `protobuf:"bytes,9,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ # Timestamp string `protobuf:"bytes,11,opt,name=timestamp" json:"timestamp,omitempty"`
+ # Providers []*MicroServiceKey `protobuf:"bytes,12,rep,name=providers" json:"providers,omitempty"`
+ # Alias string `protobuf:"bytes,13,opt,name=alias" json:"alias,omitempty"`
+ # LBStrategy map[string]string `protobuf:"bytes,14,rep,name=LBStrategy" json:"LBStrategy,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value" bson:"lb_strategy"`
+ # ModTimestamp string `protobuf:"bytes,15,opt,name=modTimestamp" json:"modTimestamp,omitempty" bson:"mod_timestamp"`
+ # Environment string `protobuf:"bytes,16,opt,name=environment" json:"environment,omitempty" bson:"env"`
+ # RegisterBy string `protobuf:"bytes,17,opt,name=registerBy" json:"registerBy,omitempty" bson:"register_by"`
+ # Framework *FrameWork `protobuf:"bytes,18,opt,name=framework" json:"framework,omitempty"`
+ #}
+
+ #collection: service
+ {
+ "_id" : ObjectId("6021fb9527d99d766f82e44f"),
+ "domain" : "new_default",
+ "project" : "new_default",
+ "tags" : null,
+ "service" : {
+ "service_id" : "6ea4d1c36a8311eba78dfa163e176e7b",
+ "app" : "dep_create_dep_group",
+ "service_name" : "dep_create_dep_consumer",
+ "version" : "1.0.0",
+ "description" : "",
+ "level" : "FRONT",
+ "schemas" : null,
+ "paths" : null,
+ "status" : "UP",
+ "properties" : null,
+ "timestamp" : "1612839829",
+ "providers" : null,
+ "alias" : "",
+ "lb_strategy" : null,
+ "mod_timestamp" : "1612839829",
+ "env" : "",
+ "register_by" : "",
+ "framework" : null
+ }
+ }
+
+ #type Instance struct {
+ # Domain string `json:"domain,omitempty"`
+ # Project string `json:"project,omitempty"`
+ # RefreshTime time.Time `json:"refreshTime,omitempty" bson:"refresh_time"`
+ # Instance *pb.MicroServiceInstance `json:"instance,omitempty"`
+ #}
+
+ #type MicroServiceInstance struct {
+ # InstanceId string `protobuf:"bytes,1,opt,name=instanceId" json:"instanceId,omitempty" bson:"instance_id"`
+ # ServiceId string `protobuf:"bytes,2,opt,name=serviceId" json:"serviceId,omitempty" bson:"service_id"`
+ # Endpoints []string `protobuf:"bytes,3,rep,name=endpoints" json:"endpoints,omitempty"`
+ # HostName string `protobuf:"bytes,4,opt,name=hostName" json:"hostName,omitempty"`
+ # Status string `protobuf:"bytes,5,opt,name=status" json:"status,omitempty"`
+ # Properties map[string]string `protobuf:"bytes,6,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
+ # HealthCheck *HealthCheck `protobuf:"bytes,7,opt,name=healthCheck" json:"healthCheck,omitempty" bson:"health_check"`
+ # Timestamp string `protobuf:"bytes,8,opt,name=timestamp" json:"timestamp,omitempty"`
+ # DataCenterInfo *DataCenterInfo `protobuf:"bytes,9,opt,name=dataCenterInfo" json:"dataCenterInfo,omitempty" bson:"data_center_info"`
+ # ModTimestamp string `protobuf:"bytes,10,opt,name=modTimestamp" json:"modTimestamp,omitempty" bson:"mod_timestamp"`
+ # Version string `protobuf:"bytes,11,opt,name=version" json:"version,omitempty"`
+ #}
+
+ # collection: instance
+ {
+ "_id" : ObjectId("60222c6f4fe067987f40803e"),
+ "domain" : "default",
+ "project" : "default",
+ "refresh_time" : ISODate("2021-02-09T06:32:15.562Z"),
+ "instance" : {
+ "instance_id" : "8cde54a46aa011ebab42fa163e176e7b",
+ "service_id" : "8cddc7ce6aa011ebab40fa163e176e7b",
+ "endpoints" : [
+ "find:127.0.0.9:8080"
+ ],
+ "hostname" : "UT-HOST-MS",
+ "status" : "UP",
+ "properties" : null,
+ "health_check" : {
+ "mode" : "push",
+ "port" : 0,
+ "interval" : 30,
+ "times" : 3,
+ "url" : ""
+ },
+ "timestamp" : "1612852335",
+ "data_center_info" : null,
+ "mod_timestamp" : "1612852335",
+ "version" : "1.0.0"
+ }
+ }
+
+ #type Schema struct {
+ # Domain string `json:"domain,omitempty"`
+ # Project string `json:"project,omitempty"`
+ # ServiceId string `json:"serviceId,omitempty" bson:"service_id"`
+ # SchemaId string `json:"schemaId,omitempty" bson:"schema_id"`
+ # Schema string `json:"schema,omitempty"`
+ # SchemaSummary string `json:"schemaSummary,omitempty" bson:"schema_summary"`
+ #}
+
+ # collection schema
+ {
+ "_id" : ObjectId("6021fb9827d99d766f82e4f7"),
+ "domain" : "default",
+ "project" : "default",
+ "service_id" : "70302da16a8311eba7cbfa163e176e7b",
+ "schema_id" : "ServiceCombTestTheLimitOfSchemasServiceMS19",
+ "schema" : "ServiceCombTestTheLimitOfSchemasServiceMS19",
+ "schema_summary" : "ServiceCombTestTheLimitOfSchemasServiceMS19"
+ }
+
+ #type Rule struct {
+ # Domain string `json:"domain,omitempty"`
+ # Project string `json:"project,omitempty"`
+ # ServiceId string `json:"serviceId,omitempty" bson:"service_id"`
+ # Rule *pb.ServiceRule `json:"rule,omitempty"`
+ #}
+
+ #type ServiceRule struct {
+ # RuleId string `protobuf:"bytes,1,opt,name=ruleId" json:"ruleId,omitempty" bson:"rule_id"`
+ # RuleType string `protobuf:"bytes,2,opt,name=ruleType" json:"ruleType,omitempty" bson:"rule_type"`
+ # Attribute string `protobuf:"bytes,3,opt,name=attribute" json:"attribute,omitempty"`
+ # Pattern string `protobuf:"bytes,4,opt,name=pattern" json:"pattern,omitempty"`
+ # Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
+ # Timestamp string `protobuf:"bytes,6,opt,name=timestamp" json:"timestamp,omitempty"`
+ # ModTimestamp string `protobuf:"bytes,7,opt,name=modTimestamp" json:"modTimestamp,omitempty" bson:"mod_timestamp"`
+ #}
+ # collection rules
+ {
+ "_id" : ObjectId("6021fb9727d99d766f82e48a"),
+ "domain" : "default",
+ "project" : "default",
+ "service_id" : "7026973b6a8311eba792fa163e176e7b",
+ "rule" : {
+ "rule_id" : "702897cf6a8311eba79dfa163e176e7b",
+ "rule_type" : "BLACK",
+ "attribute" : "ServiceName",
+ "pattern" : "18",
+ "description" : "test white",
+ "timestamp" : "1612839831",
+ "mod_timestamp" : "1612839831"
+ }
+ }
+
+ #type ConsumerDep struct {
+ # Domain string `json:"domain,omitempty"`
+ # Project string `json:"project,omitempty"`
+ # ConsumerId string `json:"consumerId,omitempty" bson:"consumer_id"`
+ # UUId string `json:"uuId,omitempty" bson:"uu_id"`
+ # ConsumerDep *pb.ConsumerDependency `json:"consumerDep,omitempty" bson:"consumer_dep"`
+ #}
+
+ #type ConsumerDependency struct {
+ # Consumer *MicroServiceKey `protobuf:"bytes,1,opt,name=consumer" json:"consumer,omitempty"`
+ # Providers []*MicroServiceKey `protobuf:"bytes,2,rep,name=providers" json:"providers,omitempty"`
+ # Override bool `protobuf:"varint,3,opt,name=override" json:"override,omitempty"`
+ #}
+
+ #type MicroServiceKey struct {
+ # Tenant string `protobuf:"bytes,1,opt,name=tenant" json:"tenant,omitempty"`
+ # Environment string `protobuf:"bytes,2,opt,name=environment" json:"environment,omitempty" bson:"env"`
+ # AppId string `protobuf:"bytes,3,opt,name=appId" json:"appId,omitempty" bson:"app"`
+ # ServiceName string `protobuf:"bytes,4,opt,name=serviceName" json:"serviceName,omitempty" bson:"service_name"`
+ # Alias string `protobuf:"bytes,5,opt,name=alias" json:"alias,omitempty"`
+ # Version string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"`
+ #}
+
+ # collection dependencies
+ {
+ "_id" : ObjectId("6021fb9527d99d766f82e45f"),
+ "domain" : "new_default",
+ "project" : "new_default",
+ "consumer_id" : "6ea4d1c36a8311eba78dfa163e176e7b",
+ "uu_id" : "6eaeb1dd6a8311eba790fa163e176e7b",
+ "consumer_dep" : {
+ "consumer" : {
+ "tenant" : "new_default/new_default",
+ "env" : "",
+ "app" : "dep_create_dep_group",
+ "service_name" : "dep_create_dep_consumer",
+ "alias" : "",
+ "version" : "1.0.0"
+ },
+ "providers" : null,
+ "override" : false
+ }
+ }
+
+ #type DependencyRule struct {
+ # Type string `json:"type,omitempty"`
+ # Domain string `json:"domain,omitempty"`
+ # Project string `json:"project,omitempty"`
+ # ServiceKey *pb.MicroServiceKey `json:"serviceKey,omitempty" bson:"service_key"`
+ # Dep *pb.MicroServiceDependency `json:"dep,omitempty"`
+ #}
+
+ #type MicroServiceKey struct {
+ # Tenant string `protobuf:"bytes,1,opt,name=tenant" json:"tenant,omitempty"`
+ # Environment string `protobuf:"bytes,2,opt,name=environment" json:"environment,omitempty" bson:"env"`
+ # AppId string `protobuf:"bytes,3,opt,name=appId" json:"appId,omitempty" bson:"app"`
+ # ServiceName string `protobuf:"bytes,4,opt,name=serviceName" json:"serviceName,omitempty" bson:"service_name"`
+ # Alias string `protobuf:"bytes,5,opt,name=alias" json:"alias,omitempty"`
+ # Version string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"`
+ #}
+
+ #type MicroServiceDependency struct {
+ # Dependency []*MicroServiceKey `json:"Dependency,omitempty"`
+ #}
+
+ # collection dependencies
+ {
+ "_id" : ObjectId("6022302751a77062a95dd0da"),
+ "service_key" : {
+ "app" : "create_dep_group",
+ "env" : "production",
+ "service_name" : "create_dep_consumer",
+ "tenant" : "default/default",
+ "version" : "1.0.0"
+ },
+ "type" : "c",
+ "dep" : {
+ "dependency" : [
+ {
+ "tenant" : "default/default",
+ "env" : "",
+ "app" : "service_group_provider",
+ "service_name" : "service_name_provider",
+ "alias" : "",
+ "version" : "latest"
+ }
+ ]
+ }
+ }
+
+
+ #type Account struct {
+ # ID string `json:"id,omitempty"`
+ # Name string `json:"name,omitempty"`
+ # Password string `json:"password,omitempty"`
+ # Roles []string `json:"roles,omitempty"`
+ # TokenExpirationTime string `json:"tokenExpirationTime,omitempty" bson:"token_expiration_time"`
+ # CurrentPassword string `json:"currentPassword,omitempty" bson:"current_password"`
+ # Status string `json:"status,omitempty"`
+ #}
+
+ # collection account
+ {
+ "_id" : ObjectId("60223e99184f264aee398238"),
+ "id" : "6038bf9f6aab11ebbcdefa163e176e7b",
+ "name" : "test-account1",
+ "password" : "$2a$14$eYyD9DiOA1vGXOyhPTjbhO6CYuGnOVt8VQ8V/sWEmExyvwOQeNI2i",
+ "roles" : [
+ "admin"
+ ],
+ "token_expiration_time" : "2020-12-30",
+ "current_password" : "tnuocca-tset1",
+ "status" : ""
+ }
diff --git a/docs/dev-guides.rst b/docs/dev-guides.rst
index 4479c03..2d166d9 100644
--- a/docs/dev-guides.rst
+++ b/docs/dev-guides.rst
@@ -1,4 +1,4 @@
-Development guide
+Development Guides
======================================
.. toctree::
@@ -10,6 +10,7 @@
dev-guides/quota.md
dev-guides/multidcs.rst
dev-guides/multidcs2.rst
- dev-guides/helm.md
dev-guides/kubeclusters.rst
+ dev-guides/helm.md
+ dev-guides/integration-istio.md
dev-guides/profiling.md
diff --git a/docs/dev-guides/dev-guide.md b/docs/dev-guides/dev-guide.md
index b119c41..1c8ba62 100644
--- a/docs/dev-guides/dev-guide.md
+++ b/docs/dev-guides/dev-guide.md
@@ -1,12 +1,12 @@
-# Development Guide
+# Development with Service-Center
This chapter is about how to implement the feature of micro-service discovery with ServiceCenter,
-and you can get more detail at [here](https://github.com/apache/servicecomb-service-center/blob/master/server/core/swagger/v3.yaml)
+and you can get more detail at [here](https://github.com/apache/servicecomb-service-center/blob/master/docs/openapi/v4.yaml)
## Micro-service registration
```bash
curl -X POST \
- http://127.0.0.1:30100/registry/v3/microservices \
+ http://127.0.0.1:30100/v4/default/registry/microservices \
-H 'content-type: application/json' \
-H 'x-domain-name: default' \
-d '{
@@ -34,7 +34,7 @@
```bash
curl -X POST \
- http://127.0.0.1:30100/registry/v3/microservices/a3fae679211211e8a831286ed488fc1b/instances \
+ http://127.0.0.1:30100/v4/default/registry/microservices/a3fae679211211e8a831286ed488fc1b/instances \
-H 'content-type: application/json' \
-H 'x-domain-name: default' \
-d '{
@@ -64,7 +64,7 @@
```bash
curl -X GET \
- 'http://127.0.0.1:30100/registry/v3/instances?appId=default&serviceName=DemoService&version=latest' \
+ 'http://127.0.0.1:30100/v4/default/registry/instances?appId=default&serviceName=DemoService&version=latest' \
-H 'content-type: application/json' \
-H 'x-consumerid: a3fae679211211e8a831286ed488fc1b' \
-H 'x-domain-name: default'
diff --git a/docs/dev-guides/extendmodule.md b/docs/dev-guides/extendmodule.md
index f48d7cb..5cd30ce 100644
--- a/docs/dev-guides/extendmodule.md
+++ b/docs/dev-guides/extendmodule.md
@@ -3,20 +3,21 @@
Service center(SC) support an extend modules mechanism that developers can new some features in SC easily.
## Just 4 steps, you can add a module in service center
-1. Create a module(package) under the github.com/apache/servicecomb-service-center/server package.
+1. Create a module(package) under the github.com/apache/servicecomb-service-center/server/resource package.
1. Here you just need to implement the controller and service interfaces in your module.
1. And register service to SC when the module initializes.
1. Import the package in github.com/apache/servicecomb-service-center/server/bootstrap/bootstrap.go
## Quit start for the RESTful module
-Implement the [ROAServantService](https://github.com/apache/servicecomb-service-center/tree/master/pkg/rest/roa.go) interface.
+Implement the [RouteGroup](https://github.com/apache/servicecomb-service-center/tree/master/pkg/rest/types.go) interface.
```go
package hello
import (
"net/http"
+
"github.com/apache/servicecomb-service-center/pkg/rest"
)
@@ -43,10 +44,10 @@
```go
package hello
-import roa "github.com/apache/servicecomb-service-center/pkg/rest"
+import "github.com/apache/servicecomb-service-center/pkg/rest"
func init() {
- roa.RegisterServant(&HelloService{})
+ rest.RegisterServant(&HelloService{})
}
```
@@ -54,9 +55,5 @@
```go
// module
-import _ "github.com/apache/servicecomb-service-center/server/hello"
+import _ "github.com/apache/servicecomb-service-center/server/resource/hello"
```
-
-## About GRPC module
-
-To see [govern](https://github.com/apache/servicecomb-service-center/tree/master/server/rest/govern) module for help.
\ No newline at end of file
diff --git a/docs/user-guides/integration-istio.md b/docs/dev-guides/integration-istio.md
similarity index 98%
rename from docs/user-guides/integration-istio.md
rename to docs/dev-guides/integration-istio.md
index 74ab844..c7d6b83 100644
--- a/docs/user-guides/integration-istio.md
+++ b/docs/dev-guides/integration-istio.md
@@ -1,6 +1,8 @@
-# User Guide
+# Integrate with Istio
This instructions will lead you to getting start with using Servicecomb-service-center-istio
+
+
## 1. Install dependencies
This tool can be used both inside a k8s cluster and a standalone service running on a VM.
@@ -61,7 +63,7 @@
```
### 2.4 Input parameters
-
+
## 3 Example
We will use [consumer-provider](../../istio/examples/consumer-provider/) example to show how to use this tool.
diff --git a/docs/integration-istio.png b/docs/dev-guides/integration-istio.png
similarity index 100%
rename from docs/integration-istio.png
rename to docs/dev-guides/integration-istio.png
Binary files differ
diff --git a/docs/user-guides/integration-istio.png b/docs/dev-guides/istio-cli.png
similarity index 100%
rename from docs/user-guides/integration-istio.png
rename to docs/dev-guides/istio-cli.png
Binary files differ
diff --git a/docs/dev-guides/quota.md b/docs/dev-guides/quota.md
index f9b18a9..0149777 100644
--- a/docs/dev-guides/quota.md
+++ b/docs/dev-guides/quota.md
@@ -1,4 +1,6 @@
-# Quota plugins
+# Extend plugins
+
+The following takes the extended quota management plugin as an example.
### Standard Plugins
diff --git a/docs/index.rst b/docs/index.rst
index 4f6dbdb..d4e3d0d 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -17,18 +17,18 @@
.. toctree::
:maxdepth: 2
- :caption: Development Documentations
-
- dev-guides
-
-.. toctree::
- :maxdepth: 2
:caption: Design Documentations
design-guides
.. toctree::
:maxdepth: 2
+ :caption: Development Documentations
+
+ dev-guides
+
+.. toctree::
+ :maxdepth: 2
:caption: Release Version
release
diff --git a/docs/release.rst b/docs/release.rst
index 6965272..9d4a4cd 100644
--- a/docs/release.rst
+++ b/docs/release.rst
@@ -6,7 +6,3 @@
:glob:
release/Readme.md
- release/releaseNotes-1.0.0.md
- release/releaseNotes-1.0.0-m1.md
- release/releaseNotes-1.0.0-m2.md
- release/releaseNotes-1.1.0.md
\ No newline at end of file
diff --git a/docs/user-guides.rst b/docs/user-guides.rst
index 6f918a4..f4ceed8 100644
--- a/docs/user-guides.rst
+++ b/docs/user-guides.rst
@@ -5,18 +5,18 @@
:maxdepth: 4
:glob:
- user-guides/pr-raising-guide.md
+ user-guides/ux.md
+ user-guides/sc-cluster.rst
user-guides/security-tls.md
user-guides/data-source.rst
- user-guides/heartbeat.rst
- user-guides/sc-cluster.rst
- user-guides/integration-grafana.rst
user-guides/quota.md
- plugin-tracing-guides
- user-guides/rbac.md
- user-guides/syncer.md
- user-guides/fast-registration.md
- user-guides/ux.md
- user-guides/integration-istio.md
user-guides/limits.md
+ user-guides/metrics.md
+ plugin-tracing-guides
+ user-guides/heartbeat.rst
+ user-guides/rbac.md
+ user-guides/fast-registration.md
user-guides/turbo.md
+ user-guides/syncer.md
+ user-guides/integration-grafana.rst
+ user-guides/pr-raising-guide.md
diff --git a/docs/user-guides/rbac.md b/docs/user-guides/rbac.md
index 05bd815..a8216f6 100644
--- a/docs/user-guides/rbac.md
+++ b/docs/user-guides/rbac.md
@@ -41,7 +41,7 @@
you can use kubernetes [secret](https://kubernetes.io/zh/docs/tasks/inject-data-application/distribute-credentials-secure/)
### Generate a token
Token is the only credential to access rest API, before you access any API, you need to get a token from service center
-```shell script
+```shell
curl -X POST \
http://127.0.0.1:30100/v4/token \
-d '{"name":"root",
@@ -58,7 +58,7 @@
Authorization: Bearer {token}
```
for example:
-```shell script
+```shell
curl -X GET \
'http://127.0.0.1:30100/v4/default/registry/microservices/{service-id}/instances' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1OTI4OTQ1NTEsInVzZXIiOiJyb290In0.FfLOSvVmHT9qCZSe_6iPf4gNjbXLwCrkXxKHsdJoQ8w'
@@ -66,7 +66,7 @@
### Change password
You must supply a current password and token to update to new password
-```shell script
+```shell
curl -X POST \
http://127.0.0.1:30100/v4/account/root/password \
-H 'Authorization: Bearer {your_token}' \
@@ -79,7 +79,7 @@
### create a new account
You can create new account named "peter", and his role is developer.
How to add roles and allocate resources please refer to next section.
-```shell script
+```shell
curl -X POST \
http://127.0.0.1:30100/v4/account \
-H 'Accept: */*' \
@@ -213,7 +213,7 @@
You can also create a new role and give perms to this role.
1. You can add new role and allocate resources to new role. For example, a new role named "tester" and allocate resources to "tester".
-```shell script
+```shell
curl -X POST \
http://127.0.0.1:30100/v4/role \
-H 'Accept: */*' \
@@ -251,7 +251,7 @@
}'
```
2.then, assigning roles "tester" and "tester2" to user account "peter", "tester2" is a empty role has not any resources.
-```shell script
+```shell
curl -X POST \
http://127.0.0.1:30100/v4/account \
-H 'Accept: */*' \
@@ -265,7 +265,7 @@
```
3.Next, generate a token for the user.
-```shell script
+```shell
curl -X POST \
http://127.0.0.1:30100/v4/token \
-d '{
@@ -277,7 +277,7 @@
4.finally, user "peter" carry token to access resources.
for example
-```shell script
+```shell
curl -X POST \
http://127.0.0.1:30100/v4/default/registry/microservices \
-H 'Accept: */*' \
@@ -293,7 +293,7 @@
```
would be ok.
-```shell script
+```shell
curl -X DElETE \
http://127.0.0.1:30100/v4/default/registry/microservices \
-H 'Accept: */*' \
diff --git a/docs/user-guides/ux.rst b/docs/user-guides/ux.rst
index 7cb0a63..51f4699 100644
--- a/docs/user-guides/ux.rst
+++ b/docs/user-guides/ux.rst
@@ -1,4 +1,4 @@
-Deploying UX
+Deploying Portal
========================
https://github.com/apache/servicecomb-service-center/blob/master/ux
diff --git a/examples/etcd_data_struct.yaml b/examples/etcd_data_struct.yaml
deleted file mode 100644
index bb18424..0000000
--- a/examples/etcd_data_struct.yaml
+++ /dev/null
@@ -1,142 +0,0 @@
-# services
-# /cse-sr/ms/files/{domain}/{project}/{serviceId}
-/cse-sr/ms/files/default/default/7062417bf9ebd4c646bb23059003cea42180894a:
- {
- "serviceId": "7062417bf9ebd4c646bb23059003cea42180894a",
- "appId": "default",
- "serviceName": "SERVICECENTER",
- "description": "A default service",
- "version": "0.0.1",
- "level": "BACK",
- "schemas": [
- "firstSchema",
- "secondSchema"
- ],
- "paths": [{
- "path": "/opt/tomcat/webapp",
- "property": {
- "allowCrossApp": "true"
- }
- }],
- "status": "UP",
- "properties": {
- "allowCrossApp": "true"
- },
- "timestamp": "1592570701",
- "framework": {
- "name": "UNKNOWN",
- "version": "0.0.1"
- },
- "alias": "SERVICECENTER",
- "modTimestamp": "1592570701",
- "environment": "development"
- }
-
-# /cse-sr/ms/indexes/{domain}/{project}/{environment}/{appId}/{serviceName}/{serviceVersion}
-/cse-sr/ms/indexes/default/default/development/default/SERVICECENTER/0.0.1:
- "7062417bf9ebd4c646bb23059003cea42180894a"
-
-# /cse-sr/ms/alias/{domain}/{project}/{environment}/{appId}/{serviceName}/{serviceVersion}
-/cse-sr/ms/alias/default/default/development/default/SERVICECENTER/0.0.1:
- "7062417bf9ebd4c646bb23059003cea42180894a"
-
-# instances
-# /cse-sr/inst/files/{domain}/{project}/{serviceId}/{instanceId}
-/cse-sr/inst/files/default/default/7062417bf9ebd4c646bb23059003cea42180894a/b0ffb9feb22a11eaa76a08002706c83e:
- {
- "instanceId": "b0ffb9feb22a11eaa76a08002706c83e",
- "serviceId": "7062417bf9ebd4c646bb23059003cea42180894a",
- "endpoints": ["rest://127.0.0.1:30100/"],
- "hostName": "tian-VirtualBox",
- "status": "UP",
- "healthCheck": {
- "mode": "push",
- "interval": 30,
- "times": 3
- },
- "timestamp": "1592570701",
- "modTimestamp": "1592570701",
- "version": "0.0.1"
- }
-
-# /cse-sr/inst/leases/{domain}/{project}/{serviceId}/{instanceId}
-/cse-sr/inst/leases/default/default/7062417bf9ebd4c646bb23059003cea42180894a/b0ffb9feb22a11eaa76a08002706c83e:
- "leaseId"
-
-# schemas
-# /cse-sr/ms/schemas/{domain}/{project}/{serviceId}/{schemaId}
-/cse-sr/ms/schemas/default/default/7062417bf9ebd4c646bb23059003cea42180894a/first-schema:
- "schema"
-
-# /cse-sr/ms/schema-sum/{domain}/{project}/{serviceId}/{schemaId}
-/cse-sr/ms/schema-sum/default/default/7062417bf9ebd4c646bb23059003cea42180894a/first-schema:
- "schemaSummary"
-
-# dependencies
-# /cse-sr/ms/dep-queue/{domain}/{project}/{serviceId}/{uuid}
-/cse-sr/ms/dep-queue/default/default/7062417bf9ebd4c646bb23059003cea42180894a/0:
- {
- "consumer": {
- "tenant": "default/default",
- "project": "project",
- "appId": "appId",
- "serviceName": "ServiceCenter",
- "version": "0.0.1",
- "environment": "development",
- "alias": "serviceCenter"
- },
- "providers": [{
- "tenant": "default/default",
- "project": "project",
- "appId": "appId",
- "serviceName": "ServiceCenterProvider",
- "version": "0.0.2",
- "environment": "development",
- "alias": "serviceCenterProvider"
- }],
- "override": true
- }
-
-# tags
-# /cse-sr/ms/tags/{domain}/{project}/{serviceId}
-/cse-sr/ms/tags/default/default/7062417bf9ebd4c646bb23059003cea42180894a:
- {
- "a": "1"
- }
-
-# rules
-# /cse-sr/ms/rules/{domain}/{project}/{serviceId}/{ruleId}
-/cse-sr/ms/rules/default/default/7062417bf9ebd4c646bb23059003cea42180894a/Deny:
- {
- "ruleId": "Deny",
- "attribute": "denylist",
- "pattern": "Test*",
- "description": "test BLACK"
- }
-
-# /cse-sr/ms/rule-indexes/{domain}/{project}/{serviceId}/{attribute}/{pattern}
-/cse-sr/ms/rule-indexes/default/default/7062417bf9ebd4c646bb23059003cea42180894a/denylist/Test:
- "ruleId"
-
-# auth
-# /cse-sr/accounts/{accountName}
-/cse-sr/accounts/Alice:
- {
- "_id": "xxx",
- "account": "account_name",
- "password": "password",
- "role": "admin",
- "tokenExpirationTime": "1500519927",
- "currentPassword": "password",
- "status": "normal"
- }
-# record role binding to account
-/cse-sr/idx-role-account/{role}/{account}:
- {no value}
-# domain
-# /cse-sr/domains/{domain}
-/cse-sr/domains/default:
-
-# project
-# /cse-sr/domains/{domain}/{project}
-/cse-sr/projects/default/default:
\ No newline at end of file
diff --git a/examples/mongodb_data_struct.yaml b/examples/mongodb_data_struct.yaml
deleted file mode 100644
index c30a46f..0000000
--- a/examples/mongodb_data_struct.yaml
+++ /dev/null
@@ -1,273 +0,0 @@
-#type Service struct {
-# Domain string `json:"domain,omitempty"`
-# Project string `json:"project,omitempty"`
-# Tags map[string]string `json:"tags,omitempty"`
-# Service *pb.MicroService `json:"service,omitempty"`
-#}
-
-#type MicroService struct {
-# ServiceId string `protobuf:"bytes,1,opt,name=serviceId" json:"serviceId,omitempty" bson:"service_id"`
-# AppId string `protobuf:"bytes,2,opt,name=appId" json:"appId,omitempty" bson:"app"`
-# ServiceName string `protobuf:"bytes,3,opt,name=serviceName" json:"serviceName,omitempty" bson:"service_name"`
-# Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
-# Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
-# Level string `protobuf:"bytes,6,opt,name=level" json:"level,omitempty"`
-# Schemas []string `protobuf:"bytes,7,rep,name=schemas" json:"schemas,omitempty"`
-# Paths []*ServicePath `protobuf:"bytes,10,rep,name=paths" json:"paths,omitempty"`
-# Status string `protobuf:"bytes,8,opt,name=status" json:"status,omitempty"`
-# Properties map[string]string `protobuf:"bytes,9,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
-# Timestamp string `protobuf:"bytes,11,opt,name=timestamp" json:"timestamp,omitempty"`
-# Providers []*MicroServiceKey `protobuf:"bytes,12,rep,name=providers" json:"providers,omitempty"`
-# Alias string `protobuf:"bytes,13,opt,name=alias" json:"alias,omitempty"`
-# LBStrategy map[string]string `protobuf:"bytes,14,rep,name=LBStrategy" json:"LBStrategy,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value" bson:"lb_strategy"`
-# ModTimestamp string `protobuf:"bytes,15,opt,name=modTimestamp" json:"modTimestamp,omitempty" bson:"mod_timestamp"`
-# Environment string `protobuf:"bytes,16,opt,name=environment" json:"environment,omitempty" bson:"env"`
-# RegisterBy string `protobuf:"bytes,17,opt,name=registerBy" json:"registerBy,omitempty" bson:"register_by"`
-# Framework *FrameWork `protobuf:"bytes,18,opt,name=framework" json:"framework,omitempty"`
-#}
-
-#collection: service
-{
- "_id" : ObjectId("6021fb9527d99d766f82e44f"),
- "domain" : "new_default",
- "project" : "new_default",
- "tags" : null,
- "service" : {
- "service_id" : "6ea4d1c36a8311eba78dfa163e176e7b",
- "app" : "dep_create_dep_group",
- "service_name" : "dep_create_dep_consumer",
- "version" : "1.0.0",
- "description" : "",
- "level" : "FRONT",
- "schemas" : null,
- "paths" : null,
- "status" : "UP",
- "properties" : null,
- "timestamp" : "1612839829",
- "providers" : null,
- "alias" : "",
- "lb_strategy" : null,
- "mod_timestamp" : "1612839829",
- "env" : "",
- "register_by" : "",
- "framework" : null
- }
-}
-
-#type Instance struct {
-# Domain string `json:"domain,omitempty"`
-# Project string `json:"project,omitempty"`
-# RefreshTime time.Time `json:"refreshTime,omitempty" bson:"refresh_time"`
-# Instance *pb.MicroServiceInstance `json:"instance,omitempty"`
-#}
-
-#type MicroServiceInstance struct {
-# InstanceId string `protobuf:"bytes,1,opt,name=instanceId" json:"instanceId,omitempty" bson:"instance_id"`
-# ServiceId string `protobuf:"bytes,2,opt,name=serviceId" json:"serviceId,omitempty" bson:"service_id"`
-# Endpoints []string `protobuf:"bytes,3,rep,name=endpoints" json:"endpoints,omitempty"`
-# HostName string `protobuf:"bytes,4,opt,name=hostName" json:"hostName,omitempty"`
-# Status string `protobuf:"bytes,5,opt,name=status" json:"status,omitempty"`
-# Properties map[string]string `protobuf:"bytes,6,rep,name=properties" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
-# HealthCheck *HealthCheck `protobuf:"bytes,7,opt,name=healthCheck" json:"healthCheck,omitempty" bson:"health_check"`
-# Timestamp string `protobuf:"bytes,8,opt,name=timestamp" json:"timestamp,omitempty"`
-# DataCenterInfo *DataCenterInfo `protobuf:"bytes,9,opt,name=dataCenterInfo" json:"dataCenterInfo,omitempty" bson:"data_center_info"`
-# ModTimestamp string `protobuf:"bytes,10,opt,name=modTimestamp" json:"modTimestamp,omitempty" bson:"mod_timestamp"`
-# Version string `protobuf:"bytes,11,opt,name=version" json:"version,omitempty"`
-#}
-
-# collection: instance
-{
- "_id" : ObjectId("60222c6f4fe067987f40803e"),
- "domain" : "default",
- "project" : "default",
- "refresh_time" : ISODate("2021-02-09T06:32:15.562Z"),
- "instance" : {
- "instance_id" : "8cde54a46aa011ebab42fa163e176e7b",
- "service_id" : "8cddc7ce6aa011ebab40fa163e176e7b",
- "endpoints" : [
- "find:127.0.0.9:8080"
- ],
- "hostname" : "UT-HOST-MS",
- "status" : "UP",
- "properties" : null,
- "health_check" : {
- "mode" : "push",
- "port" : 0,
- "interval" : 30,
- "times" : 3,
- "url" : ""
- },
- "timestamp" : "1612852335",
- "data_center_info" : null,
- "mod_timestamp" : "1612852335",
- "version" : "1.0.0"
- }
-}
-
-#type Schema struct {
-# Domain string `json:"domain,omitempty"`
-# Project string `json:"project,omitempty"`
-# ServiceId string `json:"serviceId,omitempty" bson:"service_id"`
-# SchemaId string `json:"schemaId,omitempty" bson:"schema_id"`
-# Schema string `json:"schema,omitempty"`
-# SchemaSummary string `json:"schemaSummary,omitempty" bson:"schema_summary"`
-#}
-
-# collection schema
-{
- "_id" : ObjectId("6021fb9827d99d766f82e4f7"),
- "domain" : "default",
- "project" : "default",
- "service_id" : "70302da16a8311eba7cbfa163e176e7b",
- "schema_id" : "ServiceCombTestTheLimitOfSchemasServiceMS19",
- "schema" : "ServiceCombTestTheLimitOfSchemasServiceMS19",
- "schema_summary" : "ServiceCombTestTheLimitOfSchemasServiceMS19"
-}
-
-#type Rule struct {
-# Domain string `json:"domain,omitempty"`
-# Project string `json:"project,omitempty"`
-# ServiceId string `json:"serviceId,omitempty" bson:"service_id"`
-# Rule *pb.ServiceRule `json:"rule,omitempty"`
-#}
-
-#type ServiceRule struct {
-# RuleId string `protobuf:"bytes,1,opt,name=ruleId" json:"ruleId,omitempty" bson:"rule_id"`
-# RuleType string `protobuf:"bytes,2,opt,name=ruleType" json:"ruleType,omitempty" bson:"rule_type"`
-# Attribute string `protobuf:"bytes,3,opt,name=attribute" json:"attribute,omitempty"`
-# Pattern string `protobuf:"bytes,4,opt,name=pattern" json:"pattern,omitempty"`
-# Description string `protobuf:"bytes,5,opt,name=description" json:"description,omitempty"`
-# Timestamp string `protobuf:"bytes,6,opt,name=timestamp" json:"timestamp,omitempty"`
-# ModTimestamp string `protobuf:"bytes,7,opt,name=modTimestamp" json:"modTimestamp,omitempty" bson:"mod_timestamp"`
-#}
-# collection rules
-{
- "_id" : ObjectId("6021fb9727d99d766f82e48a"),
- "domain" : "default",
- "project" : "default",
- "service_id" : "7026973b6a8311eba792fa163e176e7b",
- "rule" : {
- "rule_id" : "702897cf6a8311eba79dfa163e176e7b",
- "rule_type" : "BLACK",
- "attribute" : "ServiceName",
- "pattern" : "18",
- "description" : "test white",
- "timestamp" : "1612839831",
- "mod_timestamp" : "1612839831"
- }
-}
-
-#type ConsumerDep struct {
-# Domain string `json:"domain,omitempty"`
-# Project string `json:"project,omitempty"`
-# ConsumerId string `json:"consumerId,omitempty" bson:"consumer_id"`
-# UUId string `json:"uuId,omitempty" bson:"uu_id"`
-# ConsumerDep *pb.ConsumerDependency `json:"consumerDep,omitempty" bson:"consumer_dep"`
-#}
-
-#type ConsumerDependency struct {
-# Consumer *MicroServiceKey `protobuf:"bytes,1,opt,name=consumer" json:"consumer,omitempty"`
-# Providers []*MicroServiceKey `protobuf:"bytes,2,rep,name=providers" json:"providers,omitempty"`
-# Override bool `protobuf:"varint,3,opt,name=override" json:"override,omitempty"`
-#}
-
-#type MicroServiceKey struct {
-# Tenant string `protobuf:"bytes,1,opt,name=tenant" json:"tenant,omitempty"`
-# Environment string `protobuf:"bytes,2,opt,name=environment" json:"environment,omitempty" bson:"env"`
-# AppId string `protobuf:"bytes,3,opt,name=appId" json:"appId,omitempty" bson:"app"`
-# ServiceName string `protobuf:"bytes,4,opt,name=serviceName" json:"serviceName,omitempty" bson:"service_name"`
-# Alias string `protobuf:"bytes,5,opt,name=alias" json:"alias,omitempty"`
-# Version string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"`
-#}
-
-# collection dependencies
-{
- "_id" : ObjectId("6021fb9527d99d766f82e45f"),
- "domain" : "new_default",
- "project" : "new_default",
- "consumer_id" : "6ea4d1c36a8311eba78dfa163e176e7b",
- "uu_id" : "6eaeb1dd6a8311eba790fa163e176e7b",
- "consumer_dep" : {
- "consumer" : {
- "tenant" : "new_default/new_default",
- "env" : "",
- "app" : "dep_create_dep_group",
- "service_name" : "dep_create_dep_consumer",
- "alias" : "",
- "version" : "1.0.0"
- },
- "providers" : null,
- "override" : false
- }
-}
-
-#type DependencyRule struct {
-# Type string `json:"type,omitempty"`
-# Domain string `json:"domain,omitempty"`
-# Project string `json:"project,omitempty"`
-# ServiceKey *pb.MicroServiceKey `json:"serviceKey,omitempty" bson:"service_key"`
-# Dep *pb.MicroServiceDependency `json:"dep,omitempty"`
-#}
-
-#type MicroServiceKey struct {
-# Tenant string `protobuf:"bytes,1,opt,name=tenant" json:"tenant,omitempty"`
-# Environment string `protobuf:"bytes,2,opt,name=environment" json:"environment,omitempty" bson:"env"`
-# AppId string `protobuf:"bytes,3,opt,name=appId" json:"appId,omitempty" bson:"app"`
-# ServiceName string `protobuf:"bytes,4,opt,name=serviceName" json:"serviceName,omitempty" bson:"service_name"`
-# Alias string `protobuf:"bytes,5,opt,name=alias" json:"alias,omitempty"`
-# Version string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"`
-#}
-
-#type MicroServiceDependency struct {
-# Dependency []*MicroServiceKey `json:"Dependency,omitempty"`
-#}
-
-# collection dependencies
-{
- "_id" : ObjectId("6022302751a77062a95dd0da"),
- "service_key" : {
- "app" : "create_dep_group",
- "env" : "production",
- "service_name" : "create_dep_consumer",
- "tenant" : "default/default",
- "version" : "1.0.0"
- },
- "type" : "c",
- "dep" : {
- "dependency" : [
- {
- "tenant" : "default/default",
- "env" : "",
- "app" : "service_group_provider",
- "service_name" : "service_name_provider",
- "alias" : "",
- "version" : "latest"
- }
- ]
- }
-}
-
-
-#type Account struct {
-# ID string `json:"id,omitempty"`
-# Name string `json:"name,omitempty"`
-# Password string `json:"password,omitempty"`
-# Roles []string `json:"roles,omitempty"`
-# TokenExpirationTime string `json:"tokenExpirationTime,omitempty" bson:"token_expiration_time"`
-# CurrentPassword string `json:"currentPassword,omitempty" bson:"current_password"`
-# Status string `json:"status,omitempty"`
-#}
-
-# collection account
-{
- "_id" : ObjectId("60223e99184f264aee398238"),
- "id" : "6038bf9f6aab11ebbcdefa163e176e7b",
- "name" : "test-account1",
- "password" : "$2a$14$eYyD9DiOA1vGXOyhPTjbhO6CYuGnOVt8VQ8V/sWEmExyvwOQeNI2i",
- "roles" : [
- "admin"
- ],
- "token_expiration_time" : "2020-12-30",
- "current_password" : "tnuocca-tset1",
- "status" : ""
-}
diff --git a/istio/README.md b/istio/README.md
index eb30e14..3f2ef31 100644
--- a/istio/README.md
+++ b/istio/README.md
@@ -1,8 +1,8 @@
# Servicecomb-service-center-istio
This tool synchronizes microservices from Servicecomb service center registry to Istio system which makes istio based service is able to discover Servicecomb service center based service.
-
+
# Getting Started & Documentation
-Documentation is available in [User Guide](../docs/user-guides/integration-istio.md)
+Documentation is available in [User Guide](../docs/dev-guides/integration-istio.md)
diff --git a/istio/pkg/utils/config.go b/istio/pkg/utils/config.go
index 13456fa..cb92f80 100644
--- a/istio/pkg/utils/config.go
+++ b/istio/pkg/utils/config.go
@@ -25,11 +25,9 @@
WATCHER_SVC_NAME string = "servicecenter-watcher"
// Reserved service name used by ServiceCenter, will be ignored.
// This is the default name of the ServiceCenter in an etcd-based registry
- // (https://github.com/apache/servicecomb-service-center/blob/6f26aaa7698691d40e17c6644ac71d51b6770772/examples/etcd_data_struct.yaml#L7).
SERVICECENTER_ETCD_NAME string = "SERVICECENTER"
// Reserved service name used by ServiceCenter, will be ignored.
// This is the default name of the ServiceCenter in a MongoDB-based registry
- // (https://github.com/apache/servicecomb-service-center/blob/6f26aaa7698691d40e17c6644ac71d51b6770772/examples/mongodb_data_struct.yaml#L27).
SERVICECENTER_MONGO_NAME string = "SERVICE-CENTER"
// Time in seconds to wait before syncing new services from service center registry.
PULL_INTERVAL time.Duration = time.Second * 5