Skip to content

Commit 6b51388

Browse files
authored
Add MaxConns support for http and stream UpstreamServers
1 parent f8b65d2 commit 6b51388

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

client/nginx.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ type versions []int
2929
type UpstreamServer struct {
3030
ID int `json:"id,omitempty"`
3131
Server string `json:"server"`
32+
MaxConns int `json:"max_conns"`
3233
MaxFails int `json:"max_fails"`
3334
FailTimeout string `json:"fail_timeout,omitempty"`
3435
SlowStart string `json:"slow_start,omitempty"`
@@ -38,6 +39,7 @@ type UpstreamServer struct {
3839
type StreamUpstreamServer struct {
3940
ID int `json:"id,omitempty"`
4041
Server string `json:"server"`
42+
MaxConns int `json:"max_conns"`
4143
MaxFails int `json:"max_fails"`
4244
FailTimeout string `json:"fail_timeout,omitempty"`
4345
SlowStart string `json:"slow_start,omitempty"`
@@ -156,7 +158,7 @@ type StreamZoneSync struct {
156158
Status StreamZoneSyncStatus
157159
}
158160

159-
// SyncZone represents the syncronization status of a shared memory zone
161+
// SyncZone represents the synchronization status of a shared memory zone
160162
type SyncZone struct {
161163
RecordsPending uint64 `json:"records_pending"`
162164
RecordsTotal uint64 `json:"records_total"`

tests/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func TestClient(t *testing.T) {
209209
t.Fatalf("Error when creating a client: %v", err)
210210
}
211211

212-
// test checking an upstream for exististence
212+
// test checking an upstream for existence
213213

214214
err = c.CheckIfUpstreamExists(upstream)
215215
if err != nil {

0 commit comments

Comments
 (0)