Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client stores the necessary information for a client.
func CreateClient ¶
CreateClient instantiates a client connected to Server `s` with a `clientNum`. NOTE: A `Client` instance should not be saved and reused after another `Client` has been used. A new `Client` must be reconstructed after a client switch to fetch the newest version of the lookup table.
func (*Client) AddFile ¶
AddFile adds a file to the system. It first sends the file and index to the server, and then stores the file and its lookup entry locally on the client. It also updates the lookup table stored on the server. Returns an error if the file or index is not successfully added.
func (*Client) GetFilenames ¶
GetFilenames returns all the filenames currently stored on the server as a string slice.
func (*Client) SearchWord ¶
SearchWord searches for a word in all the documents and returns the names of all the documents containing that word as a string slice, as well as the false positive rate when searching this word.