func (start) Start(c *vena.Config, httpPort, tsdbPort int) circuit.XPerm { front := New(c, httpPort, tsdbPort) circuit.Daemonize(func() { <-(chan int)(nil) }) return circuit.PermRef(front) }
func (start) Start(durableFile string, port int, readOnly bool) (circuit.XPerm, error) { a, err := New(durableFile, port, readOnly) if err != nil { return nil, err } circuit.Daemonize(func() { <-(chan int)(nil) }) // Daemonize this worker forever, i.e. worker should never die return circuit.PermRef(a), nil }
// Main starts a sumr shard server // diskpath is a directory path on the local file system, where the function is executed, // where the shard will persist its data. func (main) Main(diskpath string, forgetafter time.Duration) (circuit.XPerm, error) { srv, err := New(diskpath, forgetafter) if err != nil { return nil, err } circuit.Daemonize(func() { <-(chan int)(nil) }) return circuit.PermRef(srv), nil }
func (start) Start(dbDir string, cacheSize int) circuit.XPerm { srv, err := New(dbDir, cacheSize) if err != nil { panic(err) } circuit.Listen("vena", srv) circuit.Daemonize(func() { <-(chan int)(nil) }) return circuit.PermRef(srv) }