// TODO: check that database exists and create it if not func NewServer(config *configuration.Configuration, coord coordinator.Coordinator, clusterConfig *cluster.ClusterConfiguration) *Server { self := &Server{} self.listenAddress = config.GraphitePortString() self.database = config.GraphiteDatabase self.coordinator = coord self.shutdown = make(chan bool, 1) self.clusterConfig = clusterConfig return self }