Skip to content

Commit

Permalink
Some reverts, some import fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tit Petric committed Oct 9, 2024
1 parent 4edf1ee commit 20045ab
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/model/health_check.go → apidef/health_check.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package model
package apidef

type (
HealthCheckStatus string
Expand Down
59 changes: 59 additions & 0 deletions apidef/rpc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package apidef

type InboundData struct {
KeyName string
Value string
SessionState string
Timeout int64
Per int64
Expire int64
}

type DefRequest struct {
OrgId string
Tags []string
LoadOAS bool
}

type GroupLoginRequest struct {
UserKey string
GroupID string
ForceSync bool
Node []byte
}

// HostDetails contains information about a host machine,
// including its hostname, process ID (PID), and IP address.
type HostDetails struct {
Hostname string
PID int
Address string
}

type NodeData struct {
NodeID string `json:"node_id"`
APIKey string `json:"api_key"`
GroupID string `json:"group_id"`
NodeVersion string `json:"node_version"`
TTL int64 `json:"ttl"`
NodeIsSegmented bool `json:"node_is_segmented"`
Tags []string `json:"tags"`
Health map[string]HealthCheckItem `json:"health"`
Stats GWStats `json:"stats"`
HostDetails HostDetails `json:"host_details"`
}

type GWStats struct {
APIsCount int `json:"apis_count"`
PoliciesCount int `json:"policies_count"`
}

type GroupKeySpaceRequest struct {
OrgID string
GroupID string
}

type KeysValuesPair struct {
Keys []string
Values []string
}
7 changes: 2 additions & 5 deletions gateway/health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ import (
"sync"
"time"

"github.com/TykTechnologies/tyk/internal/model"
"github.com/TykTechnologies/tyk/rpc"

"github.com/sirupsen/logrus"

"github.com/TykTechnologies/tyk/header"
"github.com/TykTechnologies/tyk/storage"

"github.com/TykTechnologies/tyk/internal/model"
"github.com/TykTechnologies/tyk/rpc"
"github.com/TykTechnologies/tyk/storage"
)

func (gw *Gateway) setCurrentHealthCheckInfo(h map[string]model.HealthCheckItem) {
Expand Down

0 comments on commit 20045ab

Please sign in to comment.