Example #1
0
// Create a new Master Server
func NewDataServer(location proc.ServerLocation) *DataServer {
	leaseManager := NewLeaseManager()
	ds := &DataServer{
		pool:         pool.NewClientPool(),
		location:     location,
		blockServer:  NewBlockServer(location, leaseManager),
		pipelineMap:  make(map[string]*PipelineParam),
		leaseMap:     make(map[string]*proc.CatLease),
		leaseManager: leaseManager,
		commands:     make(chan *proc.MasterCommand, DEFAULT_CHAN_SIZE),
	}
	ds.registerLeaseListener()
	return ds
}
Example #2
0
func NewCatClient() *CatClient {
	return &CatClient{
		pool:   pool.NewClientPool(),
		curdir: "/",
	}
}