Skip to content

Commit ee1efdf

Browse files
committed
Merge branch 'main' of https://github.com/loxilb-io/loxicmd into main
2 parents ff875c1 + 530cc57 commit ee1efdf

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

cmd/create/create_endpoint.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ ex) loxicmd create endpoint 32.32.32.1 --name=32.32.32.1_http_8080 --probetype=h
7171
}
7272

7373
if o.ProbeType != "http" && o.ProbeType != "https" && o.ProbeType != "ping" &&
74-
o.ProbeType != "connect-tcp" && o.ProbeType != "connect-udp" &&
75-
o.ProbeType != "connect-sctp" && o.ProbeType != "none" {
74+
o.ProbeType != "tcp" && o.ProbeType != "udp" &&
75+
o.ProbeType != "sctp" && o.ProbeType != "none" {
7676
fmt.Printf("probetype '%s' is invalid\n", o.ProbeType)
7777
return
7878
}
7979

80-
if o.ProbeType == "http" || o.ProbeType == "https" || o.ProbeType == "connect-tcp" ||
81-
o.ProbeType == "connect-udp" || o.ProbeType == "connect-sctp" {
80+
if o.ProbeType == "http" || o.ProbeType == "https" || o.ProbeType == "tcp" ||
81+
o.ProbeType == "udp" || o.ProbeType == "sctp" {
8282
if o.ProbePort == 0 {
8383
fmt.Printf("probeport cant be 0 for '%s' probes\n", o.ProbeType)
8484
return
@@ -121,7 +121,7 @@ ex) loxicmd create endpoint 32.32.32.1 --name=32.32.32.1_http_8080 --probetype=h
121121
createEndPointCmd.Flags().StringVar(&o.Name, "name", "", "Endpoint Identifier")
122122
createEndPointCmd.Flags().StringVar(&o.Name, "desc", "", "Endpoint Identifier")
123123
createEndPointCmd.Flags().MarkDeprecated("desc", "This flag is decrecated, Use --name")
124-
createEndPointCmd.Flags().StringVar(&o.ProbeType, "probetype", "ping", "Probe-type:ping,http,https,connect-udp,connect-tcp,connect-sctp,none")
124+
createEndPointCmd.Flags().StringVar(&o.ProbeType, "probetype", "ping", "Probe-type:ping,http,https,udp,tcp,sctp,none")
125125
createEndPointCmd.Flags().StringVar(&o.ProbeReq, "probereq", "", "If probe is http/https, one can specify additional uri path")
126126
createEndPointCmd.Flags().StringVar(&o.ProbeResp, "proberesp", "", "If probe is http/https, one can specify custom response string")
127127
createEndPointCmd.Flags().IntVar(&o.ProbePort, "probeport", 0, "If probe is http,https,tcp,udp,sctp one can specify custom l4port to use")

cmd/delete/delete_endpoint.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ ex) loxicmd delete endpoint 31.31.31.31 --name=31.31.31.31_http_8080 --probetype
6969
}
7070

7171
if o.ProbeType != "http" && o.ProbeType != "https" && o.ProbeType != "ping" &&
72-
o.ProbeType != "connect-tcp" && o.ProbeType != "connect-udp" &&
73-
o.ProbeType != "connect-sctp" && o.ProbeType != "none" {
72+
o.ProbeType != "tcp" && o.ProbeType != "udp" &&
73+
o.ProbeType != "sctp" && o.ProbeType != "none" {
7474
fmt.Printf("probetype '%s' is invalid\n", o.ProbeType)
7575
return
7676
}
7777

78-
if o.ProbeType == "http" || o.ProbeType == "https" || o.ProbeType == "connect-tcp" ||
79-
o.ProbeType == "connect-udp" || o.ProbeType == "connect-sctp" {
78+
if o.ProbeType == "http" || o.ProbeType == "https" || o.ProbeType == "tcp" ||
79+
o.ProbeType == "udp" || o.ProbeType == "sctp" {
8080
if o.ProbePort == 0 {
8181
fmt.Printf("probeport cant be 0 for '%s' probes\n", o.ProbeType)
8282
return
@@ -120,7 +120,7 @@ ex) loxicmd delete endpoint 31.31.31.31 --name=31.31.31.31_http_8080 --probetype
120120
},
121121
}
122122
deleteEndPointCmd.Flags().StringVar(&o.Name, "name", "", "Endpoint Identifier")
123-
deleteEndPointCmd.Flags().StringVar(&o.ProbeType, "probetype", "ping", "Probe-type:ping,http,https,connect-udp,connect-tcp,connect-sctp,none")
123+
deleteEndPointCmd.Flags().StringVar(&o.ProbeType, "probetype", "ping", "Probe-type:ping,http,https,udp,tcp,sctp,none")
124124
deleteEndPointCmd.Flags().IntVar(&o.ProbePort, "probeport", 0, "If probe is http,https,tcp,udp,sctp one can specify custom l4port to use")
125125
return deleteEndPointCmd
126126
}

pkg/api/endpoint.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type EndPointGetEntry struct {
3737
// InActTries - No. of inactive probes to mark
3838
// an end-point inactive
3939
InActTries int `json:"inactiveReTries"`
40-
// ProbeType - Type of probe : "icmp","connect-tcp", "connect-udp", "connect-sctp", "http"
40+
// ProbeType - Type of probe : "icmp","tcp", "udp", "sctp", "http"
4141
ProbeType string `json:"probeType"`
4242
// ProbeReq - Request string in case of http probe
4343
ProbeReq string `json:"probeReq"`
@@ -70,7 +70,7 @@ type EndPointMod struct {
7070
// InActTries - No. of inactive probes to mark
7171
// an end-point inactive
7272
InActTries int `json:"inactiveReTries" yaml:"inactiveReTries"`
73-
// ProbeType - Type of probe : "icmp","connect-tcp", "connect-udp", "connect-sctp", "http"
73+
// ProbeType - Type of probe : "icmp","tcp", "udp", "sctp", "http"
7474
ProbeType string `json:"probeType" yaml:"probeType"`
7575
// ProbeReq - Request string in case of http probe
7676
ProbeReq string `json:"probeReq" yaml:"probeReq"`

0 commit comments

Comments
 (0)