diff --git a/api/api.go b/api/api.go index 41a4c396..ff73c13e 100644 --- a/api/api.go +++ b/api/api.go @@ -26,7 +26,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/tylerb/graceful" - "github.com/coreos/clair/api/v2" + "github.com/coreos/clair/api/v3" "github.com/coreos/clair/database" "github.com/coreos/clair/pkg/stopper" ) @@ -49,7 +49,7 @@ func RunV2(cfg *Config, store database.Datastore) { if tlsConfig != nil { log.Info("main API configured with client certificate authentication") } - v2.Run(cfg.GrpcPort, tlsConfig, cfg.CertFile, cfg.KeyFile, store) + v3.Run(cfg.GrpcPort, tlsConfig, cfg.CertFile, cfg.KeyFile, store) } func RunHealth(cfg *Config, store database.Datastore, st *stopper.Stopper) { diff --git a/api/v2/clairpb/Makefile b/api/v3/clairpb/Makefile similarity index 100% rename from api/v2/clairpb/Makefile rename to api/v3/clairpb/Makefile diff --git a/api/v2/clairpb/clair.pb.go b/api/v3/clairpb/clair.pb.go similarity index 100% rename from api/v2/clairpb/clair.pb.go rename to api/v3/clairpb/clair.pb.go diff --git a/api/v2/clairpb/clair.pb.gw.go b/api/v3/clairpb/clair.pb.gw.go similarity index 100% rename from api/v2/clairpb/clair.pb.gw.go rename to api/v3/clairpb/clair.pb.gw.go diff --git a/api/v2/clairpb/clair.proto b/api/v3/clairpb/clair.proto similarity index 100% rename from api/v2/clairpb/clair.proto rename to api/v3/clairpb/clair.proto diff --git a/api/v2/clairpb/clair.swagger.json b/api/v3/clairpb/clair.swagger.json similarity index 100% rename from api/v2/clairpb/clair.swagger.json rename to api/v3/clairpb/clair.swagger.json diff --git a/api/v2/clairpb/convert.go b/api/v3/clairpb/convert.go similarity index 100% rename from api/v2/clairpb/convert.go rename to api/v3/clairpb/convert.go diff --git a/api/v2/rpc.go b/api/v3/rpc.go similarity index 99% rename from api/v2/rpc.go rename to api/v3/rpc.go index 9225a8fe..109bf17a 100644 --- a/api/v2/rpc.go +++ b/api/v3/rpc.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v2 +package v3 import ( "fmt" @@ -24,7 +24,7 @@ import ( "google.golang.org/grpc/status" "github.com/coreos/clair" - pb "github.com/coreos/clair/api/v2/clairpb" + pb "github.com/coreos/clair/api/v3/clairpb" "github.com/coreos/clair/database" "github.com/coreos/clair/pkg/commonerr" ) diff --git a/api/v2/server.go b/api/v3/server.go similarity index 98% rename from api/v2/server.go rename to api/v3/server.go index 95b74330..e9267eb0 100644 --- a/api/v2/server.go +++ b/api/v3/server.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package v2 +package v3 import ( "context" @@ -32,7 +32,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" - pb "github.com/coreos/clair/api/v2/clairpb" + pb "github.com/coreos/clair/api/v3/clairpb" "github.com/coreos/clair/database" ) @@ -47,7 +47,7 @@ func handleShutdown(err error) { var ( promResponseDurationMilliseconds = prometheus.NewHistogramVec(prometheus.HistogramOpts{ - Name: "clair_v2_api_response_duration_milliseconds", + Name: "clair_v3_api_response_duration_milliseconds", Help: "The duration of time it takes to receive and write a response to an V2 API request", Buckets: prometheus.ExponentialBuckets(9.375, 2, 10), }, []string{"route", "code"}) diff --git a/config.example.yaml b/config.example.yaml index c45833c3..63714bab 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -31,7 +31,7 @@ clair: paginationkey: api: - # v2 grpc/RESTful API server port + # v3 grpc/RESTful API server port grpcport : 6060 # Health server port