You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/09/18 02:05:41 UTC
[GitHub] [apisix-dashboard] ShiningRush commented on a change in pull request #484: chore: add structs
ShiningRush commented on a change in pull request #484:
URL: https://github.com/apache/apisix-dashboard/pull/484#discussion_r490658451
##########
File path: api/internal/core/entity/entity.go
##########
@@ -11,16 +11,107 @@ type Route struct {
Host string `json:"host,omitempty"`
Hosts []string `json:"hosts,omitempty"`
RemoteAddr string `json:"remote_addr,omitempty"`
- RemoteAddrs string `json:"remote_addrs,omitempty"`
+ RemoteAddrs []string `json:"remote_addrs,omitempty"`
Vars string `json:"vars,omitempty"`
FilterFunc string `json:"filter_func,omitempty"`
Script string `json:"script,omitempty"`
Plugins interface{} `json:"plugins,omitempty"`
Upstream Upstream `json:"upstream,omitempty"`
- ServiceId string `json:"service_id,omitempty"`
- UpstreamId string `json:"upstream_id,omitempty"`
+ ServiceID string `json:"service_id,omitempty"`
+ UpstreamID string `json:"upstream_id,omitempty"`
ServiceProtocol string `json:"service_protocol,omitempty"`
}
+type Timeout struct {
+ Connect int `json:"connect,omitempty"`
+ Send int `json:"send,omitempty"`
+ Read int `json:"read,omitempty"`
+}
+
+type Node struct {
+ Host string `json:"host,omitempty"`
+ Port int `json:"port,omitempty"`
+ Weight int `json:"weight,omitempty"`
+ Metadata interface{} `json:"metadata,omitempty"`
+}
+
+type K8sInfo struct {
+ Namespace string `json:"namespace,omitempty"`
+ DeployName string `json:"deploy_name,omitempty"`
+ ServiceName string `json:"service_name,omitempty"`
+ Port int `json:"port,omitempty"`
+ BackendType string `json:"backend_type,omitempty"`
+}
+
+type Healthy struct {
+ HttpStatuses []int `json:"http_statuses,omitempty"`
Review comment:
Missing `interval`
##########
File path: api/internal/core/entity/entity.go
##########
@@ -11,16 +11,107 @@ type Route struct {
Host string `json:"host,omitempty"`
Hosts []string `json:"hosts,omitempty"`
RemoteAddr string `json:"remote_addr,omitempty"`
- RemoteAddrs string `json:"remote_addrs,omitempty"`
+ RemoteAddrs []string `json:"remote_addrs,omitempty"`
Vars string `json:"vars,omitempty"`
FilterFunc string `json:"filter_func,omitempty"`
Script string `json:"script,omitempty"`
Plugins interface{} `json:"plugins,omitempty"`
Upstream Upstream `json:"upstream,omitempty"`
- ServiceId string `json:"service_id,omitempty"`
- UpstreamId string `json:"upstream_id,omitempty"`
+ ServiceID string `json:"service_id,omitempty"`
+ UpstreamID string `json:"upstream_id,omitempty"`
ServiceProtocol string `json:"service_protocol,omitempty"`
}
+type Timeout struct {
+ Connect int `json:"connect,omitempty"`
+ Send int `json:"send,omitempty"`
+ Read int `json:"read,omitempty"`
+}
+
+type Node struct {
+ Host string `json:"host,omitempty"`
+ Port int `json:"port,omitempty"`
+ Weight int `json:"weight,omitempty"`
+ Metadata interface{} `json:"metadata,omitempty"`
+}
+
+type K8sInfo struct {
+ Namespace string `json:"namespace,omitempty"`
+ DeployName string `json:"deploy_name,omitempty"`
+ ServiceName string `json:"service_name,omitempty"`
+ Port int `json:"port,omitempty"`
+ BackendType string `json:"backend_type,omitempty"`
+}
+
+type Healthy struct {
+ HttpStatuses []int `json:"http_statuses,omitempty"`
+ Successes int `json:"successes,omitempty"`
+}
+
+type UnHealthy struct {
Review comment:
Missing interval
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org