From 59cb69e66d816d9a090d20c0cf55f3b2a6eea91c Mon Sep 17 00:00:00 2001 From: Menghan Li Date: Wed, 20 Sep 2017 14:55:57 -0700 Subject: [PATCH] Fix misspells (#1531) --- clientconn.go | 4 ++-- credentials/credentials_test.go | 2 +- reflection/grpc_reflection_v1alpha/reflection.pb.go | 2 +- reflection/grpc_reflection_v1alpha/reflection.proto | 2 +- rpc_util.go | 4 ++-- stats/stats.go | 8 ++++---- stress/grpc_testing/metrics.pb.go | 2 +- stress/grpc_testing/metrics.proto | 2 +- test/end2end_test.go | 2 +- transport/bdp_estimator.go | 6 +++--- transport/http2_client.go | 4 ++-- transport/http2_server.go | 4 ++-- transport/transport.go | 6 +++--- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/clientconn.go b/clientconn.go index 45ea87eb6..6691d8af3 100644 --- a/clientconn.go +++ b/clientconn.go @@ -279,7 +279,7 @@ func WithUserAgent(s string) DialOption { } } -// WithKeepaliveParams returns a DialOption that specifies keepalive paramaters for the client transport. +// WithKeepaliveParams returns a DialOption that specifies keepalive parameters for the client transport. func WithKeepaliveParams(kp keepalive.ClientParameters) DialOption { return func(o *dialOptions) { o.copts.KeepaliveParams = kp @@ -483,7 +483,7 @@ type connectivityStateEvaluator struct { // recordTransition records state change happening in every addrConn and based on // that it evaluates what state the ClientConn is in. // It can only transition between connectivity.Ready, connectivity.Connecting and connectivity.TransientFailure. Other states, -// Idle and connectivity.Shutdown are transitioned into by ClientConn; in the begining of the connection +// Idle and connectivity.Shutdown are transitioned into by ClientConn; in the beginning of the connection // before any addrConn is created ClientConn is in idle state. In the end when ClientConn // closes it is in connectivity.Shutdown state. // TODO Note that in later releases, a ClientConn with no activity will be put into an Idle state. diff --git a/credentials/credentials_test.go b/credentials/credentials_test.go index af4078628..9b13db51d 100644 --- a/credentials/credentials_test.go +++ b/credentials/credentials_test.go @@ -128,7 +128,7 @@ func launchServer(t *testing.T, hs serverHandshake, done chan AuthInfo) net.List return lis } -// Is run in a seperate goroutine. +// Is run in a separate goroutine. func serverHandle(t *testing.T, hs serverHandshake, done chan AuthInfo, lis net.Listener) { serverRawConn, err := lis.Accept() if err != nil { diff --git a/reflection/grpc_reflection_v1alpha/reflection.pb.go b/reflection/grpc_reflection_v1alpha/reflection.pb.go index b148c1cfa..b40725327 100644 --- a/reflection/grpc_reflection_v1alpha/reflection.pb.go +++ b/reflection/grpc_reflection_v1alpha/reflection.pb.go @@ -281,7 +281,7 @@ func (m *ExtensionRequest) GetExtensionNumber() int32 { type ServerReflectionResponse struct { ValidHost string `protobuf:"bytes,1,opt,name=valid_host,json=validHost" json:"valid_host,omitempty"` OriginalRequest *ServerReflectionRequest `protobuf:"bytes,2,opt,name=original_request,json=originalRequest" json:"original_request,omitempty"` - // The server set one of the following fields accroding to the message_request + // The server set one of the following fields according to the message_request // in the request. // // Types that are valid to be assigned to MessageResponse: diff --git a/reflection/grpc_reflection_v1alpha/reflection.proto b/reflection/grpc_reflection_v1alpha/reflection.proto index e980bdf74..c52ccc6ab 100644 --- a/reflection/grpc_reflection_v1alpha/reflection.proto +++ b/reflection/grpc_reflection_v1alpha/reflection.proto @@ -72,7 +72,7 @@ message ExtensionRequest { message ServerReflectionResponse { string valid_host = 1; ServerReflectionRequest original_request = 2; - // The server set one of the following fields accroding to the message_request + // The server set one of the following fields according to the message_request // in the request. oneof message_response { // This message is used to answer file_by_filename, file_containing_symbol, diff --git a/rpc_util.go b/rpc_util.go index 423d7d3cf..aa0c6b68c 100644 --- a/rpc_util.go +++ b/rpc_util.go @@ -456,7 +456,7 @@ type MethodConfig struct { // MaxReqSize is the maximum allowed payload size for an individual request in a // stream (client->server) in bytes. The size which is measured is the serialized // payload after per-message compression (but before stream compression) in bytes. - // The actual value used is the minumum of the value specified here and the value set + // The actual value used is the minimum of the value specified here and the value set // by the application via the gRPC client API. If either one is not set, then the other // will be used. If neither is set, then the built-in default is used. MaxReqSize *int @@ -501,7 +501,7 @@ func getMaxSize(mcMax, doptMax *int, defaultVal int) *int { // SupportPackageIsVersion3 is referenced from generated protocol buffer files. // The latest support package version is 4. -// SupportPackageIsVersion3 is kept for compability. It will be removed in the +// SupportPackageIsVersion3 is kept for compatibility. It will be removed in the // next support package version update. const SupportPackageIsVersion3 = true diff --git a/stats/stats.go b/stats/stats.go index e7a14d922..b64c42955 100644 --- a/stats/stats.go +++ b/stats/stats.go @@ -220,7 +220,7 @@ type outgoingTagsKey struct{} // the outgoing RPC with the header grpc-tags-bin. Subsequent calls to // SetTags will overwrite the values from earlier calls. // -// NOTE: this is provided only for backward compatibilty with existing clients +// NOTE: this is provided only for backward compatibility with existing clients // and will likely be removed in an upcoming release. New uses should transmit // this type of data using metadata with a different, non-reserved (i.e. does // not begin with "grpc-") header name. @@ -230,7 +230,7 @@ func SetTags(ctx context.Context, b []byte) context.Context { // Tags returns the tags from the context for the inbound RPC. // -// NOTE: this is provided only for backward compatibilty with existing clients +// NOTE: this is provided only for backward compatibility with existing clients // and will likely be removed in an upcoming release. New uses should transmit // this type of data using metadata with a different, non-reserved (i.e. does // not begin with "grpc-") header name. @@ -262,7 +262,7 @@ type outgoingTraceKey struct{} // the outgoing RPC with the header grpc-trace-bin. Subsequent calls to // SetTrace will overwrite the values from earlier calls. // -// NOTE: this is provided only for backward compatibilty with existing clients +// NOTE: this is provided only for backward compatibility with existing clients // and will likely be removed in an upcoming release. New uses should transmit // this type of data using metadata with a different, non-reserved (i.e. does // not begin with "grpc-") header name. @@ -272,7 +272,7 @@ func SetTrace(ctx context.Context, b []byte) context.Context { // Trace returns the trace from the context for the inbound RPC. // -// NOTE: this is provided only for backward compatibilty with existing clients +// NOTE: this is provided only for backward compatibility with existing clients // and will likely be removed in an upcoming release. New uses should transmit // this type of data using metadata with a different, non-reserved (i.e. does // not begin with "grpc-") header name. diff --git a/stress/grpc_testing/metrics.pb.go b/stress/grpc_testing/metrics.pb.go index 96e1a7de3..466668a4d 100644 --- a/stress/grpc_testing/metrics.pb.go +++ b/stress/grpc_testing/metrics.pb.go @@ -34,7 +34,7 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package -// Reponse message containing the gauge name and value +// Response message containing the gauge name and value type GaugeResponse struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` // Types that are valid to be assigned to Value: diff --git a/stress/grpc_testing/metrics.proto b/stress/grpc_testing/metrics.proto index dd8abdaad..695040064 100644 --- a/stress/grpc_testing/metrics.proto +++ b/stress/grpc_testing/metrics.proto @@ -22,7 +22,7 @@ syntax = "proto3"; package grpc.testing; -// Reponse message containing the gauge name and value +// Response message containing the gauge name and value message GaugeResponse { string name = 1; oneof value { diff --git a/test/end2end_test.go b/test/end2end_test.go index 504b8540a..983a9b7e1 100644 --- a/test/end2end_test.go +++ b/test/end2end_test.go @@ -2175,7 +2175,7 @@ func testLargeUnary(t *testing.T, e env) { } } -// Test backward-compatability API for setting msg size limit. +// Test backward-compatibility API for setting msg size limit. func TestExceedMsgLimit(t *testing.T) { defer leakcheck.Check(t) for _, e := range listTestEnv() { diff --git a/transport/bdp_estimator.go b/transport/bdp_estimator.go index 667edb80b..8dd2ed427 100644 --- a/transport/bdp_estimator.go +++ b/transport/bdp_estimator.go @@ -59,7 +59,7 @@ type bdpEstimator struct { sample uint32 // bwMax is the maximum bandwidth noted so far (bytes/sec). bwMax float64 - // bool to keep track of the begining of a new measurement cycle. + // bool to keep track of the beginning of a new measurement cycle. isSent bool // Callback to update the window sizes. updateFlowControl func(n uint32) @@ -70,7 +70,7 @@ type bdpEstimator struct { } // timesnap registers the time bdp ping was sent out so that -// network rtt can be calculated when its ack is recieved. +// network rtt can be calculated when its ack is received. // It is called (by controller) when the bdpPing is // being written on the wire. func (b *bdpEstimator) timesnap(d [8]byte) { @@ -119,7 +119,7 @@ func (b *bdpEstimator) calculate(d [8]byte) { b.rtt += (rttSample - b.rtt) * float64(alpha) } b.isSent = false - // The number of bytes accumalated so far in the sample is smaller + // The number of bytes accumulated so far in the sample is smaller // than or equal to 1.5 times the real BDP on a saturated connection. bwCurrent := float64(b.sample) / (b.rtt * float64(1.5)) if bwCurrent > b.bwMax { diff --git a/transport/http2_client.go b/transport/http2_client.go index 4d811a8b9..31fed9e39 100644 --- a/transport/http2_client.go +++ b/transport/http2_client.go @@ -367,7 +367,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (_ *Strea // options, then both sets of credentials will be applied. if callCreds := callHdr.Creds; callCreds != nil { if !t.isSecure && callCreds.RequireTransportSecurity() { - return nil, streamErrorf(codes.Unauthenticated, "transport: cannot send secure credentials on an insecure conneciton") + return nil, streamErrorf(codes.Unauthenticated, "transport: cannot send secure credentials on an insecure connection") } data, err := callCreds.GetRequestMetadata(ctx, audience) if err != nil { @@ -961,7 +961,7 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) { t.notifyError(connectionErrorf(true, nil, "received illegal http2 GOAWAY frame: stream ID %d is even", f.LastStreamID)) return } - // A client can recieve multiple GoAways from server (look at https://github.com/grpc/grpc-go/issues/1387). + // A client can receive multiple GoAways from server (look at https://github.com/grpc/grpc-go/issues/1387). // The idea is that the first GoAway will be sent with an ID of MaxInt32 and the second GoAway will be sent after an RTT delay // with the ID of the last stream the server will process. // Therefore, when we get the first GoAway we don't really close any streams. While in case of second GoAway we diff --git a/transport/http2_server.go b/transport/http2_server.go index 80ddd5fb5..4f62cba53 100644 --- a/transport/http2_server.go +++ b/transport/http2_server.go @@ -105,7 +105,7 @@ type http2Server struct { // the per-stream outbound flow control window size set by the peer. streamSendQuota uint32 // idle is the time instant when the connection went idle. - // This is either the begining of the connection or when the number of + // This is either the beginning of the connection or when the number of // RPCs go down to 0. // When the connection is busy, this value is set to 0. idle time.Time @@ -938,7 +938,7 @@ func (t *http2Server) keepalive() { maxAge := time.NewTimer(t.kp.MaxConnectionAge) keepalive := time.NewTimer(t.kp.Time) // NOTE: All exit paths of this function should reset their - // respecitve timers. A failure to do so will cause the + // respective timers. A failure to do so will cause the // following clean-up to deadlock and eventually leak. defer func() { if !maxIdle.Stop() { diff --git a/transport/transport.go b/transport/transport.go index 6aabbd3ff..dad69be61 100644 --- a/transport/transport.go +++ b/transport/transport.go @@ -492,9 +492,9 @@ type ConnectOptions struct { KeepaliveParams keepalive.ClientParameters // StatsHandler stores the handler for stats. StatsHandler stats.Handler - // InitialWindowSize sets the intial window size for a stream. + // InitialWindowSize sets the initial window size for a stream. InitialWindowSize int32 - // InitialConnWindowSize sets the intial window size for a connection. + // InitialConnWindowSize sets the initial window size for a connection. InitialConnWindowSize int32 } @@ -720,7 +720,7 @@ const ( // NoReason is the default value when GoAway frame is received. NoReason GoAwayReason = 1 // TooManyPings indicates that a GoAway frame with ErrCodeEnhanceYourCalm - // was recieved and that the debug data said "too_many_pings". + // was received and that the debug data said "too_many_pings". TooManyPings GoAwayReason = 2 )