Add comments to ClientConn/SubConn interfaces to indicate new methods may be added (#1680)
This commit is contained in:
@ -63,6 +63,11 @@ func Get(name string) Builder {
|
|||||||
// When the connection encounters an error, it will reconnect immediately.
|
// When the connection encounters an error, it will reconnect immediately.
|
||||||
// When the connection becomes IDLE, it will not reconnect unless Connect is
|
// When the connection becomes IDLE, it will not reconnect unless Connect is
|
||||||
// called.
|
// called.
|
||||||
|
//
|
||||||
|
// This interface is to be implemented by gRPC. Users should not need a
|
||||||
|
// brand new implementation of this interface. For the situations like
|
||||||
|
// testing, the new implementation should embed this interface. This allows
|
||||||
|
// gRPC to add new methods to this interface.
|
||||||
type SubConn interface {
|
type SubConn interface {
|
||||||
// UpdateAddresses updates the addresses used in this SubConn.
|
// UpdateAddresses updates the addresses used in this SubConn.
|
||||||
// gRPC checks if currently-connected address is still in the new list.
|
// gRPC checks if currently-connected address is still in the new list.
|
||||||
@ -80,6 +85,11 @@ type SubConn interface {
|
|||||||
type NewSubConnOptions struct{}
|
type NewSubConnOptions struct{}
|
||||||
|
|
||||||
// ClientConn represents a gRPC ClientConn.
|
// ClientConn represents a gRPC ClientConn.
|
||||||
|
//
|
||||||
|
// This interface is to be implemented by gRPC. Users should not need a
|
||||||
|
// brand new implementation of this interface. For the situations like
|
||||||
|
// testing, the new implementation should embed this interface. This allows
|
||||||
|
// gRPC to add new methods to this interface.
|
||||||
type ClientConn interface {
|
type ClientConn interface {
|
||||||
// NewSubConn is called by balancer to create a new SubConn.
|
// NewSubConn is called by balancer to create a new SubConn.
|
||||||
// It doesn't block and wait for the connections to be established.
|
// It doesn't block and wait for the connections to be established.
|
||||||
|
|||||||
@ -94,6 +94,11 @@ type BuildOption struct {
|
|||||||
|
|
||||||
// ClientConn contains the callbacks for resolver to notify any updates
|
// ClientConn contains the callbacks for resolver to notify any updates
|
||||||
// to the gRPC ClientConn.
|
// to the gRPC ClientConn.
|
||||||
|
//
|
||||||
|
// This interface is to be implemented by gRPC. Users should not need a
|
||||||
|
// brand new implementation of this interface. For the situations like
|
||||||
|
// testing, the new implementation should embed this interface. This allows
|
||||||
|
// gRPC to add new methods to this interface.
|
||||||
type ClientConn interface {
|
type ClientConn interface {
|
||||||
// NewAddress is called by resolver to notify ClientConn a new list
|
// NewAddress is called by resolver to notify ClientConn a new list
|
||||||
// of resolved addresses.
|
// of resolved addresses.
|
||||||
|
|||||||
Reference in New Issue
Block a user