Skip to content
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

add some method to check connection alive #41

Open
vtolstov opened this issue Mar 29, 2019 · 3 comments
Open

add some method to check connection alive #41

vtolstov opened this issue Mar 29, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@vtolstov
Copy link
Contributor

For persistent connection we need to have some method to understand connection status (alive or not), may be with optional callback to ability to reconnect.

@vtolstov
Copy link
Contributor Author

as i see, we can utilize https://github.com/eBay/go-ovn/blob/master/ovnnotify.go, may be provide some time.Duration for heartbeat between client<->server (for echo, and if it not received with needed time, invalidates conn and hook callback?)

@vtolstov
Copy link
Contributor Author

may be pass something like this to GetInstance
type Handler struct {
Disconnected(interface{})
}

so use can handle this and reconnect?

@vtolstov
Copy link
Contributor Author

@hzhou8 i think that we need to decide some interface how to pass disconnect handler.
I think that we need to have some Config struct with ovn endpoint address in url.URL format, may be ssl credentials like ca, cert, key. and pointer to disconnect handler.
What you think?
So to create instance we need to call c, err := ovn.Client(&Config{xxx})

@vtolstov vtolstov added the enhancement New feature or request label Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant