diff --git a/client/action.go b/client/action.go index a3221a0eb8..c71efdfaf8 100644 --- a/client/action.go +++ b/client/action.go @@ -127,6 +127,7 @@ func (refOpts *ReferenceOptions) refer(srv common.RPCService, info *ClientInfo) common.WithParams(refOpts.getURLMap()), common.WithParamsValue(constant.BeanNameKey, refOpts.id), common.WithParamsValue(constant.MetadataTypeKey, refOpts.metaDataType), + common.WithParamsValue(constant.TimeoutKey, refOpts.Consumer.RequestTimeout), common.WithParamsValue(constant.KeepAliveInterval, ref.KeepAliveInterval), common.WithParamsValue(constant.KeepAliveTimeout, ref.KeepAliveTimeout), ) diff --git a/protocol/dubbo/dubbo_invoker.go b/protocol/dubbo/dubbo_invoker.go index 378deb6074..ebab28b263 100644 --- a/protocol/dubbo/dubbo_invoker.go +++ b/protocol/dubbo/dubbo_invoker.go @@ -41,8 +41,7 @@ import ( ) var attachmentKey = []string{ - constant.InterfaceKey, constant.GroupKey, constant.TokenKey, constant.TimeoutKey, - constant.VersionKey, + constant.InterfaceKey, constant.GroupKey, constant.TokenKey, constant.VersionKey, } // DubboInvoker is implement of protocol.Invoker. A dubboInvoker refers to one service and ip. diff --git a/protocol/dubbo/hessian2/hessian_dubbo.go b/protocol/dubbo/hessian2/hessian_dubbo.go index 5ae8b26436..83f6159194 100644 --- a/protocol/dubbo/hessian2/hessian_dubbo.go +++ b/protocol/dubbo/hessian2/hessian_dubbo.go @@ -76,7 +76,7 @@ func NewHessianCodec(reader *bufio.Reader) *HessianCodec { } } -// NewHessianCodec generate a new hessian codec instance +// NewHessianCodecCustom generate a new hessian codec instance func NewHessianCodecCustom(pkgType PackageType, reader *bufio.Reader, bodyLen int) *HessianCodec { return &HessianCodec{ pkgType: pkgType, diff --git a/protocol/dubbo/impl/response.go b/protocol/dubbo/impl/response.go index 9fde1eb249..b4ef40ec7d 100644 --- a/protocol/dubbo/impl/response.go +++ b/protocol/dubbo/impl/response.go @@ -23,7 +23,7 @@ type ResponsePayload struct { Attachments map[string]interface{} } -// NewResponse create a new ResponsePayload +// NewResponsePayload create a new ResponsePayload func NewResponsePayload(rspObj interface{}, exception error, attachments map[string]interface{}) *ResponsePayload { if attachments == nil { attachments = make(map[string]interface{}) diff --git a/protocol/dubbo3/dubbo3_exporter.go b/protocol/dubbo3/dubbo3_exporter.go index eff398a840..f53d8118c2 100644 --- a/protocol/dubbo3/dubbo3_exporter.go +++ b/protocol/dubbo3/dubbo3_exporter.go @@ -48,7 +48,7 @@ func NewDubboExporter(key string, invoker protocol.Invoker, exporterMap *sync.Ma } } -// Unexport unexport dubbo3 service exporter. +// UnExport unexport dubbo3 service exporter. func (de *DubboExporter) UnExport() { url := de.GetInvoker().GetURL() interfaceName := url.GetParam(constant.InterfaceKey, "") diff --git a/protocol/grpc/internal/routeguide/client.go b/protocol/grpc/internal/routeguide/client.go index 542667ef5c..fd0a3b5551 100644 --- a/protocol/grpc/internal/routeguide/client.go +++ b/protocol/grpc/internal/routeguide/client.go @@ -36,7 +36,7 @@ func init() { config.SetConsumerService(&RouteGuideClientImpl{}) } -// printFeatures lists all the features within the given bounding Rectangle. +// PrintFeatures lists all the features within the given bounding Rectangle. func PrintFeatures(stream RouteGuide_ListFeaturesClient) { for { feature, err := stream.Recv() @@ -51,7 +51,7 @@ func PrintFeatures(stream RouteGuide_ListFeaturesClient) { } } -// runRecordRoute sends a sequence of points to server and expects to get a RouteSummary from server. +// RunRecordRoute sends a sequence of points to server and expects to get a RouteSummary from server. func RunRecordRoute(stream RouteGuide_RecordRouteClient) { // Create a random number of random points r := rand.New(rand.NewSource(time.Now().UnixNano())) diff --git a/protocol/jsonrpc/jsonrpc_exporter.go b/protocol/jsonrpc/jsonrpc_exporter.go index 5ff72f95db..669e59d5e2 100644 --- a/protocol/jsonrpc/jsonrpc_exporter.go +++ b/protocol/jsonrpc/jsonrpc_exporter.go @@ -43,7 +43,7 @@ func NewJsonrpcExporter(key string, invoker protocol.Invoker, exporterMap *sync. } } -// Unexport exported JSON RPC service. +// UnExport exported JSON RPC service. func (je *JsonrpcExporter) UnExport() { interfaceName := je.GetInvoker().GetURL().GetParam(constant.InterfaceKey, "") err := common.ServiceMap.UnRegister(interfaceName, JSONRPC, je.GetInvoker().GetURL().ServiceKey()) diff --git a/protocol/rest/rest_exporter.go b/protocol/rest/rest_exporter.go index 5731881096..16ace5bf38 100644 --- a/protocol/rest/rest_exporter.go +++ b/protocol/rest/rest_exporter.go @@ -43,7 +43,7 @@ func NewRestExporter(key string, invoker protocol.Invoker, exporterMap *sync.Map } } -// Unexport unexport the RestExporter +// UnExport unexport the RestExporter func (re *RestExporter) UnExport() { interfaceName := re.GetInvoker().GetURL().GetParam(constant.InterfaceKey, "") err := common.ServiceMap.UnRegister(interfaceName, REST, re.GetInvoker().GetURL().ServiceKey()) diff --git a/registry/etcdv3/service_discovery.go b/registry/etcdv3/service_discovery.go index 59cb096c9a..f2187a73b0 100644 --- a/registry/etcdv3/service_discovery.go +++ b/registry/etcdv3/service_discovery.go @@ -300,7 +300,7 @@ func (e *etcdV3ServiceDiscovery) DataChange(eventType remoting.Event) bool { return true } -// newEtcdv3ServiceDiscovery +// newEtcdV3ServiceDiscovery func newEtcdV3ServiceDiscovery(url *common.URL) (registry.ServiceDiscovery, error) { initLock.Lock() defer initLock.Unlock() diff --git a/xds/credentials/certgenerate/generate_cert.go b/xds/credentials/certgenerate/generate_cert.go index 32a4c53651..160cb10cbc 100644 --- a/xds/credentials/certgenerate/generate_cert.go +++ b/xds/credentials/certgenerate/generate_cert.go @@ -328,7 +328,7 @@ func genCertTemplateFromCSR(csr *x509.CertificateRequest, subjectIDs []string, t }, nil } -// genCertTemplateFromoptions generates a certificate template with the given options. +// genCertTemplateFromOptions generates a certificate template with the given options. func genCertTemplateFromOptions(options CertOptions) (*x509.Certificate, error) { var keyUsage x509.KeyUsage if options.IsCA {