|
12 | 12 | // See the License for the specific language governing permissions and |
13 | 13 | // limitations under the License. |
14 | 14 |
|
15 | | -package parserprovider // import "go.opentelemetry.io/collector/service/parserprovider" |
| 15 | +package config // import "go.opentelemetry.io/collector/config" |
16 | 16 |
|
17 | 17 | import ( |
18 | 18 | "context" |
19 | | - |
20 | | - "go.opentelemetry.io/collector/config" |
21 | 19 | ) |
22 | 20 |
|
23 | 21 | // MapProvider is an interface that helps providing configuration's parser. |
24 | 22 | // Implementations may load the parser from a file, a database or any other source. |
25 | 23 | type MapProvider interface { |
26 | | - // Get returns the config.Map if succeed or error otherwise. |
27 | | - Get(ctx context.Context) (*config.Map, error) |
| 24 | + // Get returns the Map if succeed or error otherwise. |
| 25 | + Get(ctx context.Context) (*Map, error) |
28 | 26 |
|
29 | 27 | // Close signals that the configuration for which it was used to retrieve values is no longer in use |
30 | 28 | // and the object should close and release any watchers that it may have created. |
31 | 29 | // This method must be called when the service ends, either in case of success or error. |
32 | 30 | Close(ctx context.Context) error |
33 | 31 | } |
34 | 32 |
|
35 | | -// Watchable is an extension for MapProvider that is implemented if the given provider |
| 33 | +// WatchableMapProvider is an extension for MapProvider that is implemented if the given provider |
36 | 34 | // supports monitoring of configuration updates. |
37 | | -type Watchable interface { |
| 35 | +type WatchableMapProvider interface { |
38 | 36 | // WatchForUpdate waits for updates on any of the values retrieved from config sources. |
39 | 37 | // It blocks until configuration updates are received and can |
40 | 38 | // return an error if anything fails. WatchForUpdate is used once during the |
|
0 commit comments