aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/allocate_volume.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-02-18 12:11:52 -0800
committerChris Lu <chris.lu@gmail.com>2019-02-18 12:11:52 -0800
commit77b9af531d18e10b04b49b069b5f26a329ed4902 (patch)
treecae2524dfc445b352e5d6bab7a82f7af46b7a4c8 /weed/topology/allocate_volume.go
parent55761ae806bc7cc8ab34424508aee5481131b941 (diff)
downloadseaweedfs-77b9af531d18e10b04b49b069b5f26a329ed4902.tar.xz
seaweedfs-77b9af531d18e10b04b49b069b5f26a329ed4902.zip
adding grpc mutual tls
Diffstat (limited to 'weed/topology/allocate_volume.go')
-rw-r--r--weed/topology/allocate_volume.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/topology/allocate_volume.go b/weed/topology/allocate_volume.go
index 55796ab43..ff0bbce42 100644
--- a/weed/topology/allocate_volume.go
+++ b/weed/topology/allocate_volume.go
@@ -2,6 +2,7 @@ package topology
import (
"context"
+ "google.golang.org/grpc"
"time"
"github.com/chrislusf/seaweedfs/weed/operation"
@@ -13,9 +14,9 @@ type AllocateVolumeResult struct {
Error string
}
-func AllocateVolume(dn *DataNode, vid storage.VolumeId, option *VolumeGrowOption) error {
+func AllocateVolume(dn *DataNode, grpcDialOption grpc.DialOption, vid storage.VolumeId, option *VolumeGrowOption) error {
- return operation.WithVolumeServerClient(dn.Url(), func(client volume_server_pb.VolumeServerClient) error {
+ return operation.WithVolumeServerClient(dn.Url(), grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(5*time.Second))
defer cancel()