From 5c91d09147054df10771ba29e7f79cc30c1bb5bc Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Sun, 11 Apr 2021 11:25:23 -0700 Subject: [PATCH] Add missing comments --- experimental/configsource/factory.go | 1 + experimental/configsource/settings.go | 2 ++ experimental/configsource/vaultconfigsource/config.go | 1 + experimental/configsource/vaultconfigsource/factory.go | 1 + 4 files changed, 5 insertions(+) diff --git a/experimental/configsource/factory.go b/experimental/configsource/factory.go index b5b605b23cf..e4c0236701c 100644 --- a/experimental/configsource/factory.go +++ b/experimental/configsource/factory.go @@ -50,4 +50,5 @@ type Factory interface { CreateConfigSource(ctx context.Context, params CreateParams, cfg ConfigSettings) (ConfigSource, error) } +// Factories is a map from types of ConfigSource and the respective Factory for the type. type Factories map[config.Type]Factory diff --git a/experimental/configsource/settings.go b/experimental/configsource/settings.go index 5057f3f76b5..05a6cff155f 100644 --- a/experimental/configsource/settings.go +++ b/experimental/configsource/settings.go @@ -18,6 +18,8 @@ import ( "go.opentelemetry.io/collector/config" ) +// ConfigSettings is an interface that must be supported by all configuration objects +// of ConfigSource implementations. type ConfigSettings interface { config.NamedEntity } diff --git a/experimental/configsource/vaultconfigsource/config.go b/experimental/configsource/vaultconfigsource/config.go index 896b1ca11e3..e4c29f8f854 100644 --- a/experimental/configsource/vaultconfigsource/config.go +++ b/experimental/configsource/vaultconfigsource/config.go @@ -21,6 +21,7 @@ import ( "go.opentelemetry.io/collector/experimental/configsource" ) +// Config holds the configuration settings for Vault ConfigSource objects. type Config struct { *configsource.Settings // Endpoint is the address of the Vault server, typically it is set via the diff --git a/experimental/configsource/vaultconfigsource/factory.go b/experimental/configsource/vaultconfigsource/factory.go index 8599fb80eec..c620ad305a7 100644 --- a/experimental/configsource/vaultconfigsource/factory.go +++ b/experimental/configsource/vaultconfigsource/factory.go @@ -80,6 +80,7 @@ func (v *vaultFactory) CreateConfigSource(_ context.Context, params configsource return newConfigSource(params.Logger, vaultCfg) } +// NewFactory creates a factory for Vault ConfigSource objects. func NewFactory() configsource.Factory { return &vaultFactory{} }