Skip to content

Commit

Permalink
fix: rename SpdkJSONRPC to Client
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <[email protected]>
  • Loading branch information
glimchb committed Oct 9, 2023
1 parent 6aa3fd9 commit 79f8951
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func runGrpcServer(grpcPort int, useKvm bool, store gokv.Store, spdkAddress, qmp
)
s := grpc.NewServer(serverOptions...)

jsonRPC := spdk.NewSpdkJSONRPC(spdkAddress)
jsonRPC := spdk.NewClient(spdkAddress)
backendServer := backend.NewServer(jsonRPC, store)
middleendServer := middleend.NewServer(jsonRPC, store)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1
github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0
github.com/onsi/ginkgo/v2 v2.12.1
github.com/opiproject/gospdk v0.0.0-20231003165248-8edbef6eb841
github.com/opiproject/gospdk v0.0.0-20231009130851-ff9bd6faf71a
github.com/opiproject/opi-api v0.0.0-20231005114927-ec55946e5197
github.com/philippgille/gokv v0.6.0
github.com/philippgille/gokv/gomap v0.6.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ github.com/opiproject/gospdk v0.0.0-20230924031820-4b65d0851cb9 h1:DkqXBfcVaJEts
github.com/opiproject/gospdk v0.0.0-20230924031820-4b65d0851cb9/go.mod h1:rO2nM/OyY69zPLQO2mNX8+ckvyAd2TqV1vLLG7qEB74=
github.com/opiproject/gospdk v0.0.0-20231003165248-8edbef6eb841 h1:xfR6qBHRRsRunE6+yDX5s1BhFFMElJNGh0MOt0rjLsU=
github.com/opiproject/gospdk v0.0.0-20231003165248-8edbef6eb841/go.mod h1:mRMIpGIwz5uuUUaDhh6ceIYq20qR5OVtxE0/x5fprEA=
github.com/opiproject/gospdk v0.0.0-20231009130851-ff9bd6faf71a h1:8j6GXu13bFM3uEo30n1H3h1MmgncFhjQkqw0TWEEy00=
github.com/opiproject/gospdk v0.0.0-20231009130851-ff9bd6faf71a/go.mod h1:mRMIpGIwz5uuUUaDhh6ceIYq20qR5OVtxE0/x5fprEA=
github.com/opiproject/opi-api v0.0.0-20231004104309-217649f4535f h1:TXLfuUmFwB7Zk8YKIzEfT/LQ2i5d+BW/BzjQgaBBOWM=
github.com/opiproject/opi-api v0.0.0-20231004104309-217649f4535f/go.mod h1:92pv4ulvvPMuxCJ9ND3aYbmBfEMLx0VCjpkiR7ZTqPY=
github.com/opiproject/opi-api v0.0.0-20231005114927-ec55946e5197 h1:3wsLOfvfaVcnhA3ehz4HkAoejop/rlLy0msWM2pA0zw=
Expand Down
2 changes: 1 addition & 1 deletion pkg/frontend/frontend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func dialer(opiSpdkServer *Server) func(context.Context, string) (net.Conn, erro
}

func TestFrontEnd_NewCustomizedServer(t *testing.T) {
validJSONRPC := spdk.NewSpdkJSONRPC("/some/path")
validJSONRPC := spdk.NewClient("/some/path")
validNvmeTransports := map[pb.NvmeTransportType]NvmeTransport{
pb.NvmeTransportType_NVME_TRANSPORT_TCP: NewNvmeTCPTransport(),
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ func LimitPagination[T any](result []T, offset int, size int) ([]T, bool) {

// CreateTestSpdkServer creates a mock spdk server for testing
func CreateTestSpdkServer(socket string, spdkResponses []string) (net.Listener, spdk.JSONRPC) {
jsonRPC := spdk.NewSpdkJSONRPC(socket)
jsonRPC := spdk.NewClient(socket)
ln := jsonRPC.StartUnixListener()
if len(spdkResponses) > 0 {
go spdkMockServerCommunicate(jsonRPC, ln, spdkResponses)
}
return ln, jsonRPC.(*spdk.SpdkJSONRPC)
return ln, jsonRPC
}

// CloseGrpcConnection is utility function used to defer grpc connection close is tests
Expand Down

0 comments on commit 79f8951

Please sign in to comment.