api: renamed V2 API to V3 API for consistency.
This commit is contained in:
parent
57a4f97780
commit
58022d97e3
@ -26,7 +26,7 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/tylerb/graceful"
|
"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/database"
|
||||||
"github.com/coreos/clair/pkg/stopper"
|
"github.com/coreos/clair/pkg/stopper"
|
||||||
)
|
)
|
||||||
@ -49,7 +49,7 @@ func RunV2(cfg *Config, store database.Datastore) {
|
|||||||
if tlsConfig != nil {
|
if tlsConfig != nil {
|
||||||
log.Info("main API configured with client certificate authentication")
|
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) {
|
func RunHealth(cfg *Config, store database.Datastore, st *stopper.Stopper) {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package v2
|
package v3
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -24,7 +24,7 @@ import (
|
|||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
|
|
||||||
"github.com/coreos/clair"
|
"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/database"
|
||||||
"github.com/coreos/clair/pkg/commonerr"
|
"github.com/coreos/clair/pkg/commonerr"
|
||||||
)
|
)
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package v2
|
package v3
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@ -32,7 +32,7 @@ import (
|
|||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/credentials"
|
"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"
|
"github.com/coreos/clair/database"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ func handleShutdown(err error) {
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
promResponseDurationMilliseconds = prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
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",
|
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),
|
Buckets: prometheus.ExponentialBuckets(9.375, 2, 10),
|
||||||
}, []string{"route", "code"})
|
}, []string{"route", "code"})
|
@ -31,7 +31,7 @@ clair:
|
|||||||
paginationkey:
|
paginationkey:
|
||||||
|
|
||||||
api:
|
api:
|
||||||
# v2 grpc/RESTful API server port
|
# v3 grpc/RESTful API server port
|
||||||
grpcport : 6060
|
grpcport : 6060
|
||||||
|
|
||||||
# Health server port
|
# Health server port
|
||||||
|
Loading…
Reference in New Issue
Block a user