server

package
v0.0.0-...-d20dd18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2016 License: MIT Imports: 12 Imported by: 2

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

func (*DBServer) Stop

func (s *DBServer) Stop()

Stop the server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL