From 6ea977c5940240fee2e91040c80f89b3374a74a9 Mon Sep 17 00:00:00 2001 From: rjs211 Date: Sun, 7 Feb 2021 15:45:18 +0530 Subject: [PATCH] minor refactor Signed-off-by: rjs211 --- cmd/collector/app/collector.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/collector/app/collector.go b/cmd/collector/app/collector.go index eb3e174c502..d90770a7941 100644 --- a/cmd/collector/app/collector.go +++ b/cmd/collector/app/collector.go @@ -45,11 +45,11 @@ type Collector struct { spanHandlers *SpanHandlers // state, read only - hServer *http.Server - zkServer *http.Server - grpcServer *grpc.Server - TLSGRPCCloser io.Closer - TLSHTTPCloser io.Closer + hServer *http.Server + zkServer *http.Server + grpcServer *grpc.Server + tlsGRPCCertWatcherCloser io.Closer + tlsHTTPCertWatcherCloser io.Closer } // CollectorParams to construct a new Jaeger Collector. @@ -112,8 +112,8 @@ func (c *Collector) Start(builderOpts *CollectorOptions) error { } c.hServer = httpServer - c.TLSGRPCCloser = &builderOpts.TLSGRPC - c.TLSHTTPCloser = &builderOpts.TLSHTTP + c.tlsGRPCCertWatcherCloser = &builderOpts.TLSGRPC + c.tlsHTTPCertWatcherCloser = &builderOpts.TLSHTTP zkServer, err := server.StartZipkinServer(&server.ZipkinServerParams{ HostPort: builderOpts.CollectorZipkinHTTPHostPort, Handler: c.spanHandlers.ZipkinSpansHandler, @@ -168,11 +168,11 @@ func (c *Collector) Close() error { c.logger.Error("failed to close span processor.", zap.Error(err)) } - if err := c.TLSGRPCCloser.Close(); err != nil { + if err := c.tlsGRPCCertWatcherCloser.Close(); err != nil { c.logger.Error("failed to close gRPC TLS certificate watcher", zap.Error(err)) } - if err := c.TLSHTTPCloser.Close(); err != nil { + if err := c.tlsHTTPCertWatcherCloser.Close(); err != nil { c.logger.Error("failed to close HTTP TLS certificate watcher", zap.Error(err)) }