sync_volume.go 594 B

123456789101112131415161718192021
  1. package operation
  2. import (
  3. "context"
  4. "github.com/chrislusf/seaweedfs/weed/pb"
  5. "github.com/chrislusf/seaweedfs/weed/pb/volume_server_pb"
  6. "google.golang.org/grpc"
  7. )
  8. func GetVolumeSyncStatus(server pb.ServerAddress, grpcDialOption grpc.DialOption, vid uint32) (resp *volume_server_pb.VolumeSyncStatusResponse, err error) {
  9. WithVolumeServerClient(false, server, grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {
  10. resp, err = client.VolumeSyncStatus(context.Background(), &volume_server_pb.VolumeSyncStatusRequest{
  11. VolumeId: vid,
  12. })
  13. return nil
  14. })
  15. return
  16. }