From 625374ee363d096b6f45968e9065ac258ac1e31a Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Thu, 13 Aug 2015 20:38:25 +0200 Subject: [PATCH] Clarify docs of TargetProvider --- retrieval/targetmanager.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/retrieval/targetmanager.go b/retrieval/targetmanager.go index 61f103590..ba64f55e8 100644 --- a/retrieval/targetmanager.go +++ b/retrieval/targetmanager.go @@ -33,7 +33,10 @@ import ( // // The TargetProvider does not have to guarantee that an actual change happened. // It does guarantee that it sends the new TargetGroup whenever a change happens. -// On startup it sends all TargetGroups it can see. +// +// Sources() is guaranteed to be called exactly once before each call to Run(). +// On a call to Run() implementing types must send a valid target group for each of +// the sources they declared in the last call to Sources(). type TargetProvider interface { // Sources returns the source identifiers the provider is currently aware of. Sources() []string