Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBServer ¶
type DBServer struct {
// contains filtered or unexported fields
}
DBServer manages a Treeless node server
func Assoc ¶
func Assoc(localIP string, localPort int, localDBpath string, localChunkSize uint64, openDB bool, assocAddr string) *DBServer
Assoc associates a new DB server node to an existint server group localIP and localPort sets the ip:port to use by this server localDBpath sets the path to store/open the DB localChunkSize sets the server chunk size in bytes openDB should be true if you want to open an already stored DB, set it to false if you want to create a new DB, overwriting previous DB if it exists assocAddr is the ip:port address of one of the server groups nodes, it will be used at initialization time to associate this server
func Create ¶
func Create(localIP string, localPort int, localDBpath string, localChunkSize uint64, openDB bool, numChunks, redundancy int) *DBServer
Create creates a new DB server group localIP and localPort sets the ip:port to use by this server localDBpath sets the path to store/open the DB localChunkSize sets the server chunk size in bytes openDB should be true if you want to open an already stored DB, set it to false if you want to create a new DB, overwriting previous DB if it exists numChunks is the number of chunks to use in the new server group redundancy is the level of redundancy to use in the new server group, 1 means that only one server will have each chunk/partition