Skip to content

Commit

Permalink
fix: get IP failure (#1994)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <101104760+ZhangSetSail@users.noreply.github.com>
  • Loading branch information
ZhangSetSail authored Nov 9, 2024
1 parent d93ec69 commit 5fa5d72
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/apis/rainbond/v1alpha1/third_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,15 @@ func (in *Handler) Equals(target *Handler) bool {
return in.TCPSocket.Equals(target.TCPSocket)
}

//ComponentPort component port define
// ComponentPort component port define
type ComponentPort struct {
Name string `json:"name"`
Port int `json:"port"`
OpenInner bool `json:"openInner"`
OpenOuter bool `json:"openOuter"`
}

//TCPSocketAction enable tcp check
// TCPSocketAction enable tcp check
type TCPSocketAction struct {
}

Expand All @@ -237,7 +237,7 @@ func (in *TCPSocketAction) Equals(target *TCPSocketAction) bool {
return true
}

//HTTPGetAction enable http check
// HTTPGetAction enable http check
type HTTPGetAction struct {
// Path to access on the HTTP server.
// +optional
Expand Down Expand Up @@ -337,6 +337,9 @@ func (e EndpointAddress) getIP() string {
if len(info) == 2 {
return info[0]
}
if len(info) == 3 {
return info[1]
}
return ""
}

Expand Down Expand Up @@ -399,7 +402,7 @@ func NewEndpointAddress(host string, port int) *EndpointAddress {
return &ea
}

//ThirdComponentEndpointStatus endpoint status
// ThirdComponentEndpointStatus endpoint status
type ThirdComponentEndpointStatus struct {
// The address including the port number.
Address EndpointAddress `json:"address"`
Expand Down

0 comments on commit 5fa5d72

Please sign in to comment.