mirror of https://github.com/grpc/grpc-go.git
				
				
				
			rename Type()
This commit is contained in:
		
							parent
							
								
									ef3d58fc04
								
							
						
					
					
						commit
						f49ac9d0df
					
				| 
						 | 
					@ -80,7 +80,7 @@ type ProtocolInfo struct {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// AuthInfo defines the common interface for the auth information the users are interested in.
 | 
					// AuthInfo defines the common interface for the auth information the users are interested in.
 | 
				
			||||||
type AuthInfo interface {
 | 
					type AuthInfo interface {
 | 
				
			||||||
	Type() string
 | 
						AuthType() string
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type authInfoKey struct{}
 | 
					type authInfoKey struct{}
 | 
				
			||||||
| 
						 | 
					@ -118,7 +118,7 @@ type TLSInfo struct {
 | 
				
			||||||
	state tls.ConnectionState
 | 
						state tls.ConnectionState
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (t TLSInfo) Type() string {
 | 
					func (t TLSInfo) AuthType() string {
 | 
				
			||||||
	return "tls"
 | 
						return "tls"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -120,7 +120,7 @@ func (s *testServer) UnaryCall(ctx context.Context, in *testpb.SimpleRequest) (*
 | 
				
			||||||
		var authType string
 | 
							var authType string
 | 
				
			||||||
		switch info := authInfo.(type) {
 | 
							switch info := authInfo.(type) {
 | 
				
			||||||
		case credentials.TLSInfo:
 | 
							case credentials.TLSInfo:
 | 
				
			||||||
			authType = info.Type()
 | 
								authType = info.AuthType()
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			grpclog.Fatalf("Unknown AuthInfo type")
 | 
								grpclog.Fatalf("Unknown AuthInfo type")
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue