Skip to content

Commit

Permalink
feat: rename InventorySvc to InventopryService
Browse files Browse the repository at this point in the history
Signed-off-by: Artsiom Koltun <[email protected]>
  • Loading branch information
artek-koltun authored and glimchb committed Oct 24, 2023
1 parent b817b86 commit c7fb111
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func runGrpcServer() {
}
s := grpc.NewServer()

pc.RegisterInventorySvcServer(s, &inventory.Server{})
pc.RegisterInventoryServiceServer(s, &inventory.Server{})
reflection.Register(s)

log.Printf("gRPC Server listening at %v", lis.Addr())
Expand All @@ -60,7 +60,7 @@ func runGatewayServer() {
// Note: Make sure the gRPC server is running properly and accessible
mux := runtime.NewServeMux()
opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())}
err := pc.RegisterInventorySvcHandlerFromEndpoint(ctx, mux, fmt.Sprintf(":%d", *grpcPort), opts)
err := pc.RegisterInventoryServiceHandlerFromEndpoint(ctx, mux, fmt.Sprintf(":%d", *grpcPort), opts)
if err != nil {
log.Panic("cannot register handler server")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/inventory/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

// Server contains inventory related OPI services
type Server struct {
pc.UnimplementedInventorySvcServer
pc.UnimplementedInventoryServiceServer
}

// GetInventory returns inventory information
Expand Down
4 changes: 2 additions & 2 deletions pkg/inventory/inventory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
func dialer() func(context.Context, string) (net.Conn, error) {
listener := bufconn.Listen(1024 * 1024)
server := grpc.NewServer()
pc.RegisterInventorySvcServer(server, &Server{})
pc.RegisterInventoryServiceServer(server, &Server{})

go func() {
if err := server.Serve(listener); err != nil {
Expand Down Expand Up @@ -71,7 +71,7 @@ func Test_GetInventory(t *testing.T) {
log.Fatal(err)
}
}(conn)
client := pc.NewInventorySvcClient(conn)
client := pc.NewInventoryServiceClient(conn)

// run tests
for _, tt := range tests {
Expand Down

0 comments on commit c7fb111

Please sign in to comment.