-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 and use connectivity package for states #1430
Conversation
@dzbarsky FYI, we will be changing the connectivity API slightly in this PR (to support upcoming work revamping the resolver and balancer logic), in case you are using it already. |
@@ -587,9 +554,9 @@ type ClientConn struct { | |||
mkp keepalive.ClientParameters | |||
} | |||
|
|||
// WaitForStateChange waits until the ConnectivityState of ClientConn changes from sourceState or | |||
// WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or | |||
// ctx expires. A true value is returned in former case and false in latter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeesh, we didn't write the "experimental" disclaimer here. Can you add it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -602,8 +569,8 @@ func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState Connec | |||
} | |||
} | |||
|
|||
// GetState returns the ConnectivityState of ClientConn. | |||
func (cc *ClientConn) GetState() ConnectivityState { | |||
// GetState returns the connectivity.State of ClientConn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@dfawley thanks for the warning, we're already using this since we were blocked on it for a while. It looks like this just moved it to a separate package so that shouldn't be a problem for us. Please let us know if there are any actual breaking changes, thanks! |
Add and use connectivity package for states (grpc#1430) * Add and use connectivity package * Mark cc state APIs as experimental Add balancer, resolver and connectivity package. add balancer_v1_wrapper.go and remove grpclb.go all test passed, how? end2end passed, nil pointer failure, ac.wait return nil transport fix ac.wait return nil transport, races not fixed (accessing cc.balancer) end2end passed, TODO grpclb all test passed add grpclb back move building balancer out from a goroutine to avoid race Otherwise, Dial() and Close() may race. Mark new APIs experimental split resetAddrConn into newAddrConn and connect add acBalancerWrapper rename file to balancer_conn_wrappers.go remove grpclog.Print make TODO(bar) remove Print comments fixes add missing license fix build failure after merge fix race in grpclb
Add and use connectivity package for states (grpc#1430) * Add and use connectivity package * Mark cc state APIs as experimental Add balancer, resolver and connectivity package. add balancer_v1_wrapper.go and remove grpclb.go all test passed, how? end2end passed, nil pointer failure, ac.wait return nil transport fix ac.wait return nil transport, races not fixed (accessing cc.balancer) end2end passed, TODO grpclb all test passed add grpclb back move building balancer out from a goroutine to avoid race Otherwise, Dial() and Close() may race. Mark new APIs experimental split resetAddrConn into newAddrConn and connect add acBalancerWrapper rename file to balancer_conn_wrappers.go remove grpclog.Print make TODO(bar) remove Print comments fixes add missing license fix build failure after merge fix race in grpclb
* Add and use connectivity package * Mark cc state APIs as experimental
Add and use connectivity package for states (grpc#1430) * Add and use connectivity package * Mark cc state APIs as experimental Add balancer, resolver and connectivity package. add balancer_v1_wrapper.go and remove grpclb.go all test passed, how? end2end passed, nil pointer failure, ac.wait return nil transport fix ac.wait return nil transport, races not fixed (accessing cc.balancer) end2end passed, TODO grpclb all test passed add grpclb back move building balancer out from a goroutine to avoid race Otherwise, Dial() and Close() may race. Mark new APIs experimental split resetAddrConn into newAddrConn and connect add acBalancerWrapper rename file to balancer_conn_wrappers.go remove grpclog.Print make TODO(bar) remove Print comments fixes add missing license fix build failure after merge fix race in grpclb
No description provided.