Skip to content
Snippets Groups Projects
Commit d95fe890 authored by Jake Taylor's avatar Jake Taylor
Browse files

add public Host.Connect function

parent 101ed7a9
No related branches found
No related tags found
2 merge requests!39Merge release into master,!27add configurable flag for lazy connections to hostParams.go
......@@ -275,6 +275,14 @@ func (h *Host) transmit(f func(conn *grpc.ClientConn) (interface{},
return a, err
}
// Connect allows manual connection to the host if it does not have a valid connection
func (h *Host) Connect() error {
h.connectionMux.Lock()
defer h.connectionMux.Unlock()
return h.connect()
}
// connect attempts to connect to the host if it does not have a valid connection
func (h *Host) connect() error {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment