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/17 15:49:42 UTC

[GitHub] [apisix-dashboard] nic-chen opened a new pull request #484: chore: add structs

nic-chen opened a new pull request #484:
URL: https://github.com/apache/apisix-dashboard/pull/484


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   add structs
   
   


----------------------------------------------------------------
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



[GitHub] [apisix-dashboard] nic-chen merged pull request #484: chore: add structs

Posted by GitBox <gi...@apache.org>.
nic-chen merged pull request #484:
URL: https://github.com/apache/apisix-dashboard/pull/484


   


----------------------------------------------------------------
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



[GitHub] [apisix-dashboard] ShiningRush commented on a change in pull request #484: chore: add structs

Posted by GitBox <gi...@apache.org>.
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