Better line wrapping and more comments

Signed-off-by: Ying Li <ying.li@docker.com>
This commit is contained in:
Ying Li 2015-10-14 18:10:21 -07:00
parent bca919c65f
commit 33e031444e
2 changed files with 6 additions and 2 deletions

View File

@ -14,6 +14,8 @@ import (
"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 {
State() grpc.ConnectivityState
}

View File

@ -17,7 +17,8 @@ type StubKeyManagementClient struct {
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()
if err != nil {
return nil, err
@ -30,7 +31,8 @@ type StubSignerClient struct {
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()
if err != nil {
return nil, err