diff --git a/.bingo/go.mod b/.bingo/go.mod old mode 100644 new mode 100755 diff --git a/pkg/query/storeset.go b/pkg/query/storeset.go index 7bded8e274c..571a3699229 100644 --- a/pkg/query/storeset.go +++ b/pkg/query/storeset.go @@ -51,7 +51,7 @@ type RuleSpec interface { } type TargetSpec interface { - // Addr returns RulesAPI Address for the rules spec. It is used as its ID. + // Addr returns TargetsAPI Address for the targets spec. It is used as its ID. Addr() string } diff --git a/pkg/targets/prometheus.go b/pkg/targets/prometheus.go index c04113d21f1..d3d0ae3fac6 100644 --- a/pkg/targets/prometheus.go +++ b/pkg/targets/prometheus.go @@ -13,7 +13,7 @@ import ( "github.com/thanos-io/thanos/pkg/targets/targetspb" ) -// Prometheus implements targetspb.Rules gRPC that allows to fetch targets from Prometheus HTTP api/v1/targets endpoint. +// Prometheus implements targetspb.Targets gRPC that allows to fetch targets from Prometheus HTTP api/v1/targets endpoint. type Prometheus struct { base *url.URL client *promclient.Client diff --git a/pkg/targets/targetspb/rpc.pb.go b/pkg/targets/targetspb/rpc.pb.go index 8d51c5a9d8f..ea6e46d6dcb 100644 --- a/pkg/targets/targetspb/rpc.pb.go +++ b/pkg/targets/targetspb/rpc.pb.go @@ -405,7 +405,7 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type TargetsClient interface { /// Targets has info for all targets. - /// Returned rules are expected to include external labels. + /// Returned targets are expected to include external labels. Targets(ctx context.Context, in *TargetsRequest, opts ...grpc.CallOption) (Targets_TargetsClient, error) } @@ -452,7 +452,7 @@ func (x *targetsTargetsClient) Recv() (*TargetsResponse, error) { // TargetsServer is the server API for Targets service. type TargetsServer interface { /// Targets has info for all targets. - /// Returned rules are expected to include external labels. + /// Returned targets are expected to include external labels. Targets(*TargetsRequest, Targets_TargetsServer) error } diff --git a/pkg/targets/targetspb/rpc.proto b/pkg/targets/targetspb/rpc.proto index a241b943e84..e030a2c89d7 100644 --- a/pkg/targets/targetspb/rpc.proto +++ b/pkg/targets/targetspb/rpc.proto @@ -22,10 +22,10 @@ option (gogoproto.goproto_unkeyed_all) = false; option (gogoproto.goproto_unrecognized_all) = false; option (gogoproto.goproto_sizecache_all) = false; -/// Targets represents API that is responsible for gathering rules and their statuses. +/// Targets represents API that is responsible for gathering targets and their states. service Targets { /// Targets has info for all targets. - /// Returned rules are expected to include external labels. + /// Returned targets are expected to include external labels. rpc Targets (TargetsRequest) returns (stream TargetsResponse); } @@ -43,8 +43,7 @@ message TargetsRequest { message TargetsResponse { oneof result { - /// group for rule groups. It is up to server implementation to decide how many of those to put here within single frame. - // RuleGroup group = 1; + /// structure with targets. It is up to server implementation to decide how many of those to put here within single frame. TargetDiscovery targets = 1; /// warning is considered an information piece in place of series for warning purposes. diff --git a/test/e2e/targets_api_test.go b/test/e2e/targets_api_test.go index fd7768ffd24..16dfcfb440a 100644 --- a/test/e2e/targets_api_test.go +++ b/test/e2e/targets_api_test.go @@ -108,7 +108,6 @@ func targetAndAssert(t *testing.T, ctx context.Context, addr string, state strin fmt.Println("targetAndAssert: Waiting for results for targets state", state) - //var result *targetspb.TargetDiscovery testutil.Ok(t, runutil.Retry(time.Second, ctx.Done(), func() error { res, err := promclient.NewDefaultClient().TargetsInGRPC(ctx, urlParse(t, "http://"+addr), state) if err != nil {