Skip to content

Commit 9729ec7

Browse files
authored
fix: refractor web handler and service to fix compile error; (#1325)
* fix: refractor web handler and service to fix compile error;
1 parent 55e683a commit 9729ec7

114 files changed

Lines changed: 3706 additions & 5158 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/mesh/options.pb.go

Lines changed: 49 additions & 470 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/mesh/options.proto

Lines changed: 6 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -7,81 +7,19 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh";
77
import "google/protobuf/descriptor.proto";
88

99
message DubboResourceOptions {
10-
// Name of the Dubbo resource struct.
10+
// Name and type of the dubbo resource struct.
1111
string name = 1;
1212

13-
// Name and value of the modelResourceType constant.
14-
string type = 2;
15-
16-
// True if this resource has global scope. Otherwise it will be mesh scope.
17-
bool global = 3;
13+
// The name of the resource showed as plural
14+
string plural_name = 2;
1815

1916
// Name of the resource's Go package.
20-
string package = 4;
21-
22-
// Whether to skip type registration for this resource.
23-
bool skip_registration = 6;
24-
25-
DubboDdsOptions dds = 10;
26-
DubboWsOptions ws = 7;
27-
28-
// Whether scope is "Namespace"; Otherwise to "Cluster".
29-
bool scope_namespace = 11;
30-
31-
// Whether to skip generation of native API helper functions.
32-
bool skip_kubernetes_wrappers = 12;
33-
34-
// Whether to generate Inspect API endpoint
35-
bool allow_to_inspect = 13;
36-
37-
// If resource has more than one version, then the flag defines which version
38-
// is used in the storage. All other versions must be convertible to it.
39-
bool storage_version = 14;
40-
41-
// The name of the policy showed as plural to be displayed in the UI and maybe
42-
// CLI
43-
string plural_display_name = 15;
44-
45-
// Is Experimental indicates if a policy is in experimental state (might not
46-
// be production ready).
47-
bool is_experimental = 16;
48-
49-
// Columns to set using `+kubebuilder::printcolumns`
50-
repeated string additional_printer_columns = 17;
51-
52-
// Whether the resource has a matching insight type
53-
bool has_insights = 18;
54-
}
55-
56-
message DubboWsOptions {
57-
// Name is the name of the policy for resource name usage in path.
58-
string name = 1;
59-
// Plural is only to be set if the plural of the resource is irregular (not
60-
// just adding a 's' at the end).
61-
string plural = 2;
62-
// ReadOnly if the resource is read only.
63-
bool read_only = 3;
64-
// AdminOnly whether this entity requires admin auth to access these
65-
// endpoints.
66-
bool admin_only = 4;
67-
}
68-
69-
message DubboDdsOptions {
70-
// SendToGlobal whether this entity will be sent from zone cp to global cp
71-
bool send_to_global = 1;
72-
// SendToZone whether this entity will be sent from global cp to zone cp
73-
bool send_to_zone = 2;
74-
}
17+
string package = 3;
7518

76-
message DubboPolicyOptions {
77-
// Whether to skip type registration for this resource.
78-
bool skip_registration = 1;
79-
// An optional alternative plural form if this is unset default to a standard
80-
// derivation of the name
81-
string plural = 2;
19+
// Is Experimental indicates if a resource is in experimental state.
20+
bool is_experimental = 4;
8221
}
8322

8423
extend google.protobuf.MessageOptions {
8524
DubboResourceOptions resource = 43534533; // 'dubbo'
86-
DubboPolicyOptions policy = 43534534; // 'dubbo'
8725
}

api/mesh/v1alpha1/affinity_route.pb.go

Lines changed: 20 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/mesh/v1alpha1/affinity_route.proto

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1";
77
import "api/mesh/options.proto";
88

99
message AffinityRoute {
10-
option (dubbo.mesh.resource).name = "AffinityRouteResource";
11-
option (dubbo.mesh.resource).type = "AffinityRoute";
10+
option (dubbo.mesh.resource).name = "AffinityRoute";
11+
option (dubbo.mesh.resource).plural_name = "AffinityRoutes";
1212
option (dubbo.mesh.resource).package = "mesh";
13-
option (dubbo.mesh.resource).dds.send_to_zone = true;
14-
option (dubbo.mesh.resource).ws.name = "affinityroute";
15-
option (dubbo.mesh.resource).ws.plural = "affinityroutes";
16-
option (dubbo.mesh.resource).allow_to_inspect = true;
13+
option (dubbo.mesh.resource).is_experimental = false;
1714

1815
string configVersion = 1;
19-
string scope = 2; // must be chosen from `service` and `application`
20-
string key = 3; // specifies which service or application the rule body acts on
16+
// scope must be chosen from `service` and `application`
17+
string scope = 2;
18+
// key specifies which service or application the rule body acts on
19+
string key = 3;
2120
bool runtime = 4;
2221
bool enabled = 5;
2322
AffinityAware affinity = 6;

api/mesh/v1alpha1/application.pb.go

Lines changed: 24 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/mesh/v1alpha1/application.proto

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,13 @@ import "api/mesh/options.proto";
88

99

1010
message Application {
11-
option (dubbo.mesh.resource).name = "ApplicationResource";
12-
option (dubbo.mesh.resource).type = "Application";
11+
option (dubbo.mesh.resource).name = "Application";
12+
option (dubbo.mesh.resource).plural_name = "Applications";
1313
option (dubbo.mesh.resource).package = "mesh";
14-
option (dubbo.mesh.resource).ws.name = "application";
15-
option (dubbo.mesh.resource).ws.plural = "applications";
16-
option (dubbo.mesh.resource).ws.read_only = true;
17-
option (dubbo.mesh.resource).scope_namespace = true;
18-
option (dubbo.mesh.resource).allow_to_inspect = true;
14+
option (dubbo.mesh.resource).is_experimental = true;
1915

2016
string name = 1;
2117

22-
map<string, string> features = 99;
18+
int64 instanceCount = 2;
2319

2420
}

api/mesh/v1alpha1/condition_route.pb.go

Lines changed: 5 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/mesh/v1alpha1/condition_route.proto

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ option go_package = "github.com/apache/dubbo-admin/api/mesh/v1alpha1";
77
import "api/mesh/options.proto";
88

99
message ConditionRoute {
10-
option (dubbo.mesh.resource).name = "ConditionRouteResource";
11-
option (dubbo.mesh.resource).type = "ConditionRoute";
10+
option (dubbo.mesh.resource).name = "ConditionRoute";
11+
option (dubbo.mesh.resource).plural_name = "ConditionRoutes";
1212
option (dubbo.mesh.resource).package = "mesh";
13-
option (dubbo.mesh.resource).dds.send_to_zone = true;
14-
option (dubbo.mesh.resource).ws.name = "conditionroute";
15-
option (dubbo.mesh.resource).ws.plural = "conditionroutes";
16-
option (dubbo.mesh.resource).allow_to_inspect = true;
13+
option (dubbo.mesh.resource).is_experimental = false;
1714

1815
message v3 {
1916
string configVersion = 1;

0 commit comments

Comments
 (0)