Skip to content

Commit c6ed5b3

Browse files
FrankYang0529derekbit
authored andcommitted
feat: remove proto
Signed-off-by: PoAn Yang <[email protected]>
1 parent 4fe740e commit c6ed5b3

File tree

9 files changed

+7
-2166
lines changed

9 files changed

+7
-2166
lines changed

api/types.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ package api
33
import (
44
"context"
55

6+
rpc "github.com/longhorn/types/pkg/generated/bimrpc"
67
"github.com/pkg/errors"
78
"google.golang.org/grpc"
8-
9-
"github.com/longhorn/backing-image-manager/pkg/rpc"
109
)
1110

1211
type BackingImage struct {

generate_grpc.sh

-26
This file was deleted.

pkg/client/manager_client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ package client
33
import (
44
"fmt"
55

6+
rpc "github.com/longhorn/types/pkg/generated/bimrpc"
67
"golang.org/x/net/context"
78
"google.golang.org/grpc"
89
"google.golang.org/grpc/credentials/insecure"
910
"google.golang.org/protobuf/types/known/emptypb"
1011

1112
"github.com/longhorn/backing-image-manager/api"
1213
"github.com/longhorn/backing-image-manager/pkg/meta"
13-
"github.com/longhorn/backing-image-manager/pkg/rpc"
1414
"github.com/longhorn/backing-image-manager/pkg/types"
1515
)
1616

pkg/manager/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88
"os/signal"
99
"syscall"
1010

11+
rpc "github.com/longhorn/types/pkg/generated/bimrpc"
1112
"github.com/pkg/errors"
1213
"github.com/sirupsen/logrus"
1314
"google.golang.org/grpc"
1415
"google.golang.org/grpc/reflection"
1516

16-
"github.com/longhorn/backing-image-manager/pkg/rpc"
1717
"github.com/longhorn/backing-image-manager/pkg/sync"
1818
"github.com/longhorn/backing-image-manager/pkg/util"
1919
)

pkg/manager/service.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ import (
1111
"time"
1212

1313
"github.com/golang/protobuf/ptypes/empty"
14+
butil "github.com/longhorn/backupstore/util"
15+
rpc "github.com/longhorn/types/pkg/generated/bimrpc"
1416
"github.com/pkg/errors"
1517
"github.com/sirupsen/logrus"
1618
"golang.org/x/net/context"
1719
"google.golang.org/grpc/codes"
1820
"google.golang.org/grpc/status"
1921
"google.golang.org/protobuf/types/known/emptypb"
2022

21-
butil "github.com/longhorn/backupstore/util"
22-
2323
"github.com/longhorn/backing-image-manager/api"
2424
"github.com/longhorn/backing-image-manager/pkg/backup"
2525
"github.com/longhorn/backing-image-manager/pkg/client"
26-
"github.com/longhorn/backing-image-manager/pkg/rpc"
2726
"github.com/longhorn/backing-image-manager/pkg/types"
2827
"github.com/longhorn/backing-image-manager/pkg/util"
2928
"github.com/longhorn/backing-image-manager/pkg/util/broadcaster"
3029
)
3130

3231
type Manager struct {
32+
rpc.UnimplementedBackingImageManagerServiceServer
3333
ctx context.Context
3434

3535
syncAddress string

pkg/manager/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package manager
22

33
import (
4+
rpc "github.com/longhorn/types/pkg/generated/bimrpc"
45
"golang.org/x/net/context"
56
"google.golang.org/protobuf/types/known/emptypb"
67

78
"github.com/longhorn/backing-image-manager/pkg/meta"
8-
"github.com/longhorn/backing-image-manager/pkg/rpc"
99
)
1010

1111
func (pm *Manager) VersionGet(ctx context.Context, empty *emptypb.Empty) (*rpc.VersionResponse, error) {

0 commit comments

Comments
 (0)