mirror of https://github.com/docker/docs.git
Better line wrapping and more comments
Signed-off-by: Ying Li <ying.li@docker.com>
This commit is contained in:
parent
bca919c65f
commit
33e031444e
|
@ -14,6 +14,8 @@ import (
|
||||||
"google.golang.org/grpc/credentials"
|
"google.golang.org/grpc/credentials"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// The only thing needed from grpc.ClientConn - specifying an interface
|
||||||
|
// so that the connection can be stubbed out in tests.
|
||||||
type checkableConnectionState interface {
|
type checkableConnectionState interface {
|
||||||
State() grpc.ConnectivityState
|
State() grpc.ConnectivityState
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,8 @@ type StubKeyManagementClient struct {
|
||||||
healthCheck func() (map[string]string, error)
|
healthCheck func() (map[string]string, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c StubKeyManagementClient) CheckHealth(x context.Context, v *pb.Void, o ...grpc.CallOption) (*pb.HealthStatus, error) {
|
func (c StubKeyManagementClient) CheckHealth(x context.Context,
|
||||||
|
v *pb.Void, o ...grpc.CallOption) (*pb.HealthStatus, error) {
|
||||||
status, err := c.healthCheck()
|
status, err := c.healthCheck()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -30,7 +31,8 @@ type StubSignerClient struct {
|
||||||
healthCheck func() (map[string]string, error)
|
healthCheck func() (map[string]string, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c StubSignerClient) CheckHealth(x context.Context, v *pb.Void, o ...grpc.CallOption) (*pb.HealthStatus, error) {
|
func (c StubSignerClient) CheckHealth(x context.Context, v *pb.Void,
|
||||||
|
o ...grpc.CallOption) (*pb.HealthStatus, error) {
|
||||||
status, err := c.healthCheck()
|
status, err := c.healthCheck()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue