Skip to content

Add slow-start to upstream server #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 19, 2018
Merged

Add slow-start to upstream server #1

merged 3 commits into from
Apr 19, 2018

Conversation

isaachawley
Copy link
Contributor

Made a simple main.go to test, then view the result by curling the api.

package main

import "fmt"
import "net/http"
import "github.com/nginxinc/nginx-plus-go-sdk/client"

func main() {
        httpClient := &http.Client{}
        c, err := client.NewNginxClient(httpClient, "http://127.0.0.1:8080/api")
        if err != nil {
                fmt.Println("Can't create nginx client")
        }
        server := client.UpstreamServer{
                Server:    "1.2.3.5:8080",
                SlowStart: "100s",
        }
        err = c.AddHTTPServer("test", server)
        fmt.Println(err)
        fmt.Println("vim-go")
}

@isaachawley isaachawley self-assigned this Apr 19, 2018
@pleshakov
Copy link
Contributor

@isaachawley could you add a similar this test to TestClient? We just need to add an upstream server with the slow_start value, then retrieve it and check that the slow start param is the same?

@isaachawley
Copy link
Contributor Author

New test case is in, @pleshakov anything else?

@pleshakov pleshakov merged commit 84168a5 into master Apr 19, 2018
@pleshakov pleshakov deleted the slow-start branch April 19, 2018 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants