From 8e5cf9d52b096a26e6e2f0fe6a640d26d71b34c7 Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Wed, 2 Jun 2021 07:33:01 -0700 Subject: [PATCH] Hide unnecessary public struct in obsreport Signed-off-by: Bogdan Drutu --- obsreport/obsreport_receiver.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/obsreport/obsreport_receiver.go b/obsreport/obsreport_receiver.go index e17b224fdea..7a3775f3d89 100644 --- a/obsreport/obsreport_receiver.go +++ b/obsreport/obsreport_receiver.go @@ -27,16 +27,16 @@ import ( "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" ) -// StartReceiveOptions has the options related to starting a receive operation. -type StartReceiveOptions struct { +// startReceiveOptions has the options related to starting a receive operation. +type startReceiveOptions struct { // LongLivedCtx when true indicates that the context passed in the call // outlives the individual receive operation. See WithLongLivedCtx() for // more information. LongLivedCtx bool } -// StartReceiveOption function applues changes to StartReceiveOptions. -type StartReceiveOption func(*StartReceiveOptions) +// StartReceiveOption function applues changes to startReceiveOptions. +type StartReceiveOption func(*startReceiveOptions) // WithLongLivedCtx indicates that the context passed in the call outlives the // receive operation at hand. Typically the long lived context is associated @@ -74,7 +74,7 @@ type StartReceiveOption func(*StartReceiveOptions) // } // func WithLongLivedCtx() StartReceiveOption { - return func(opts *StartReceiveOptions) { + return func(opts *startReceiveOptions) { opts.LongLivedCtx = true } } @@ -176,7 +176,7 @@ func (rec *Receiver) startOp( operationSuffix string, opt ...StartReceiveOption, ) context.Context { - var opts StartReceiveOptions + var opts startReceiveOptions for _, o := range opt { o(&opts) }