Skip to content

kasodeep/file-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed File Storage.

Understanding Go:

  • Reader and Writer of io class are used to perform the Read and Write methods into the buffers.
  • A new buffer can be created using the bytes.Buffer method.
  • Anything like a net.Conn that implements Read and Write can be used for communication.

P2P:

  • We have created a Peer (node) and Transport interface.
  • Peer is an interface that represents the remote node.
  • Transport is an interface that represents the server.

TCP Peer:

  • Methods: Send(), CloseStream().

TCP Transport:

  • Methods: ListenAndAccept(), Consume(), Addr(), Dial(), Close().
  • Private Methods: startAcceptLoop(), handleConn().

Message:

  • There are two types of RPC messages: Message and Stream.
  • The struct consists of From, Payload and Stream.

Store:

  • Methods: Read(), Write(), WriteDecrypt(), Has(), Delete().
  • The whole concepts of folder and filename revolves around the key associated with the file.
  • The methods create, read and delete files, and return io.Readers.

Crypto:

  • Methods: Encrypt(), Decrypt()
  • The concepts is to store the encrypted key as well as data on other servers.

Server:

  • Methods: Start(), Stop(), OnPeer(), Get(), Store(), Delete().

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors