Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Commit

Permalink
Move RDS package to the top-level. (#293)
Browse files Browse the repository at this point in the history
Move RDS package to the top-level (cloudprober/targets/rds -> cloudprober/rds).

RDS is becoming a core part of cloudprober now. Moving it one level-up will make it easier to find and explore the RDS code. Currently it goes too deep.

In follow up changes I'd also like to move provider packages ("gcp" and "kubernetes") from the "rds/server" directory to "rds" and add some convenient interfaces to create RDS clients for these providers and surface other information. For example, there should am easy and straight-forward way to access default lameduck topic or lameduck message format from RDS configs.

PiperOrigin-RevId: 275602304
  • Loading branch information
manugarg authored Oct 19, 2019
1 parent 5de55ba commit ee717b0
Show file tree
Hide file tree
Showing 48 changed files with 334 additions and 336 deletions.
79 changes: 40 additions & 39 deletions config/proto/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions config/proto/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ syntax = "proto2";
package cloudprober;

import "github.com/google/cloudprober/probes/proto/config.proto";
import "github.com/google/cloudprober/rds/server/proto/config.proto";
import "github.com/google/cloudprober/servers/proto/config.proto";
import "github.com/google/cloudprober/surfacers/proto/config.proto";
import "github.com/google/cloudprober/targets/proto/targets.proto";
import "github.com/google/cloudprober/targets/rds/server/proto/config.proto";
import "github.com/google/cloudprober/targets/rtc/rtcreporter/proto/rtcreporter.proto";

message ProberConfig {
Expand Down Expand Up @@ -61,7 +61,7 @@ message ProberConfig {
// Next tag: 107

// Resource discovery server
optional targets.rds.ServerConf rds_server = 95;
optional rds.ServerConf rds_server = 95;

// Port for the default HTTP server. This port is also used for prometheus
// exporter (URL /metrics). Default port is 9313. If not specified in the
Expand Down
2 changes: 1 addition & 1 deletion config/runconfig/runconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"fmt"
"sync"

rdsserver "github.com/google/cloudprober/targets/rds/server"
rdsserver "github.com/google/cloudprober/rds/server"
"google.golang.org/grpc"
)

Expand Down
2 changes: 1 addition & 1 deletion prober/prober.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ import (
"github.com/google/cloudprober/probes"
"github.com/google/cloudprober/probes/options"
probes_configpb "github.com/google/cloudprober/probes/proto"
rdsserver "github.com/google/cloudprober/rds/server"
"github.com/google/cloudprober/servers"
"github.com/google/cloudprober/surfacers"
"github.com/google/cloudprober/sysvars"
"github.com/google/cloudprober/targets"
"github.com/google/cloudprober/targets/lameduck"
rdsserver "github.com/google/cloudprober/targets/rds/server"
"github.com/google/cloudprober/targets/rtc/rtcreporter"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
Expand Down
6 changes: 3 additions & 3 deletions targets/rds/client/client.go → rds/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
"time"

"github.com/google/cloudprober/logger"
configpb "github.com/google/cloudprober/rds/client/proto"
pb "github.com/google/cloudprober/rds/proto"
spb "github.com/google/cloudprober/rds/proto"
"github.com/google/cloudprober/targets/endpoint"
configpb "github.com/google/cloudprober/targets/rds/client/proto"
pb "github.com/google/cloudprober/targets/rds/proto"
spb "github.com/google/cloudprober/targets/rds/proto"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (

"github.com/golang/protobuf/proto"
"github.com/google/cloudprober/logger"
configpb "github.com/google/cloudprober/targets/rds/client/proto"
pb "github.com/google/cloudprober/targets/rds/proto"
"github.com/google/cloudprober/targets/rds/server"
serverpb "github.com/google/cloudprober/targets/rds/server/proto"
configpb "github.com/google/cloudprober/rds/client/proto"
pb "github.com/google/cloudprober/rds/proto"
"github.com/google/cloudprober/rds/server"
serverpb "github.com/google/cloudprober/rds/server/proto"
)

type testProvider struct {
Expand Down
6 changes: 3 additions & 3 deletions targets/rds/client/cmd/client.go → rds/client/cmd/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"github.com/golang/protobuf/proto"

"github.com/google/cloudprober/logger"
"github.com/google/cloudprober/targets/rds/client"
configpb "github.com/google/cloudprober/targets/rds/client/proto"
pb "github.com/google/cloudprober/targets/rds/proto"
"github.com/google/cloudprober/rds/client"
configpb "github.com/google/cloudprober/rds/client/proto"
pb "github.com/google/cloudprober/rds/proto"
)

var (
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
// }
syntax = "proto2";

package cloudprober.targets.rds;
package cloudprober.rds;

import "github.com/google/cloudprober/targets/rds/proto/rds.proto";
import "github.com/google/cloudprober/rds/proto/rds.proto";

// ClientConf represents resource discovery service (RDS) based targets.
// Next tag: 5
Expand Down
File renamed without changes.
Loading

0 comments on commit ee717b0

Please sign in to comment.