Skip to content

Commit 71e2378

Browse files
committed
Adjust to new api
Signed-off-by: Serguei Bezverkhi <[email protected]>
1 parent d255a01 commit 71e2378

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

pkg/dbclient/mock/dbmock.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ var (
1919
type dbMock struct {
2020
mu sync.Mutex
2121
qoe map[int32]*pbapi.Qoe
22-
vpnRD2AS map[pbapi.RouteDistinguisherTwoOctetAS][]uint32
23-
vpnRD4AS map[pbapi.RouteDistinguisherFourOctetAS][]uint32
24-
vpnRDIP map[pbapi.RouteDistinguisherIPAddress][]uint32
22+
vpnRD2AS map[uint32][]uint32
2523
}
2624

2725
// GetQoE is required method by DB interface, it takes requested QoE and searches through

pkg/gateway/server.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66
"time"
77

88
pbapi "github.com/cisco-ie/jalapeno-go-gateway/pkg/apis"
9+
"github.com/cisco-ie/jalapeno-go-gateway/pkg/dbclient"
910
"github.com/golang/glog"
1011
"google.golang.org/grpc"
1112
"google.golang.org/grpc/peer"
12-
"github.com/cisco-ie/jalapeno-go-gateway/pkg/dbclient"
1313
)
1414

1515
var (
@@ -26,7 +26,7 @@ type Gateway interface {
2626
type gateway struct {
2727
gSrv *grpc.Server
2828
conn net.Listener
29-
dbc dbclient.DBClient
29+
dbc dbclient.DBClient
3030
}
3131

3232
func (g *gateway) Start() {
@@ -65,9 +65,9 @@ func NewGateway(conn net.Listener, dbc dbclient.DBClient) Gateway {
6565
gSrv := gateway{
6666
conn: conn,
6767
gSrv: grpc.NewServer([]grpc.ServerOption{}...),
68-
dbc: dbc,
68+
dbc: dbc,
6969
}
70-
pbapi.RegisterGatawayServicesServer(gSrv.gSrv, &gSrv)
70+
pbapi.RegisterGatewayServiceServer(gSrv.gSrv, &gSrv)
7171

7272
return &gSrv
7373

@@ -87,4 +87,3 @@ func (g *gateway) processQoERequest(ctx context.Context, reqQoEs *pbapi.RequestQ
8787
return nil, ctx.Err()
8888
}
8989
}
90-

pkg/gateway/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func TestClientRequestQoE(t *testing.T) {
129129
t.Fatalf("failed to dial bufnet with error: %v", err)
130130
}
131131
defer conn.Close()
132-
client := pbapi.NewGatawayServicesClient(conn)
132+
client := pbapi.NewGatewayServiceClient(conn)
133133
resp, err := client.QoE(ctx, &pbapi.RequestQoE{Qoes: tt.qoeRequest})
134134
if err != nil {
135135
t.Fatalf("QoE request failed with error: %v", err)

0 commit comments

Comments
 (0)