api: renamed V2 API to V3 API for consistency.

pull/432/head
Sida Chen 7 years ago
parent 57a4f97780
commit 58022d97e3

@ -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) {

@ -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"
)

@ -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"})

@ -31,7 +31,7 @@ clair:
paginationkey:
api:
# v2 grpc/RESTful API server port
# v3 grpc/RESTful API server port
grpcport : 6060
# Health server port

Loading…
Cancel
Save