Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide unnecessary public struct in obsreport #3353

Merged
merged 1 commit into from
Jun 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions obsreport/obsreport_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -74,7 +74,7 @@ type StartReceiveOption func(*StartReceiveOptions)
// }
//
func WithLongLivedCtx() StartReceiveOption {
return func(opts *StartReceiveOptions) {
return func(opts *startReceiveOptions) {
opts.LongLivedCtx = true
}
}
Expand Down Expand Up @@ -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)
}
Expand Down