Moving files is a solved, non trivial problem ....
Have you looked at tools like scp (ssh), rsync, kermit, ftp, sftp, tftp and
network filesystems (nfs and samba)?
Even git and http.  Error recover, host name lookup, compression, restart,
safe abort, transport encryption, authentication, buffering.

https://en.wikipedia.org/wiki/Sorcerer%27s_Apprentice_Syndrome
https://stackoverflow.com/questions/68335/how-to-copy-a-file-to-a-remote-server-in-python-using-scp-or-ssh





On Thu, Nov 1, 2018 at 11:24 PM Tamás Gulácsi <tgulacs...@gmail.com> wrote:

> 2018. november 2., péntek 6:21:47 UTC+1 időpontban Anirudh Vyas a
> következőt írta:
>>
>> Hello there -
>>
>> I am looking for example/help for using rpc to do file downloads - I am
>> not sure if this is possible, or recommended or if there is a
>> better/cleaner way. I like the robust nature of RPCs and have written a few
>> good, performant distributed systems in them - was hoping/wondering if I
>> could use RPC to do downloads - I currently use combination of io.Copy and
>> a TCP server to do this.
>>
>
> What kind of RPC ? RPC is just "Remote Procedure Call".
> If s `send(data []byte)` won't be enough (size restrictions), you can copy
> the io interfaces:
> CreateFile(name, perms...) (fileHandle)
> WriteFile(fileHandle, chunk)
> CloseFile(fileHandle)
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
   T o m    M i t c h e l l

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to