/
local_api_client.go
35 lines (27 loc) · 1.08 KB
/
local_api_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package flexvolume
import (
"github.com/golang/protobuf/ptypes/empty"
"golang.org/x/net/context"
"google.golang.org/grpc"
)
type localAPIClient struct {
apiServer APIServer
}
func newLocalAPIClient(apiServer APIServer) *localAPIClient {
return &localAPIClient{apiServer}
}
func (l *localAPIClient) Init(ctx context.Context, request *empty.Empty, _ ...grpc.CallOption) (*empty.Empty, error) {
return l.apiServer.Init(ctx, request)
}
func (l *localAPIClient) Attach(ctx context.Context, request *AttachRequest, _ ...grpc.CallOption) (*empty.Empty, error) {
return l.apiServer.Attach(ctx, request)
}
func (l *localAPIClient) Detach(ctx context.Context, request *DetachRequest, _ ...grpc.CallOption) (*empty.Empty, error) {
return l.apiServer.Detach(ctx, request)
}
func (l *localAPIClient) Mount(ctx context.Context, request *MountRequest, _ ...grpc.CallOption) (*empty.Empty, error) {
return l.apiServer.Mount(ctx, request)
}
func (l *localAPIClient) Unmount(ctx context.Context, request *UnmountRequest, _ ...grpc.CallOption) (*empty.Empty, error) {
return l.apiServer.Unmount(ctx, request)
}