mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 11:27:50 +00:00
rename server Run to Start to better reflect functionality
This commit is contained in:
parent
9deefbaefc
commit
f99479932d
3 changed files with 5 additions and 5 deletions
|
|
@ -39,7 +39,7 @@ It will load existing data from the configured
|
|||
directory and start listening for client connections
|
||||
on the configured port.`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if err := Server.Run(); err != nil {
|
||||
if err := Server.Start(); err != nil {
|
||||
return errors.Wrap(err, "running server")
|
||||
}
|
||||
return errors.Wrap(Server.Wait(), "waiting on Server")
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ func NewCommand(stdin io.Reader, stdout, stderr io.Writer) *Command {
|
|||
}
|
||||
}
|
||||
|
||||
// Run executes the pilosa server.
|
||||
func (m *Command) Run(args ...string) (err error) { // TODO args WTF
|
||||
// Start starts the pilosa server - it returns once the server is running.
|
||||
func (m *Command) Start() (err error) {
|
||||
defer close(m.Started)
|
||||
prefix := "~" + string(filepath.Separator)
|
||||
if strings.HasPrefix(m.Config.DataDir, prefix) {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ func runMainWithCluster(size int) ([]*Main, error) {
|
|||
func MustRunMain() *Main {
|
||||
m := NewMain()
|
||||
m.Config.Metric.Diagnostics = false // Disable diagnostics.
|
||||
if err := m.Run(); err != nil {
|
||||
if err := m.Start(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return m
|
||||
|
|
@ -147,7 +147,7 @@ func (m *Main) Reopen() error {
|
|||
m.Server.Holder.NewAttrStore = m.Server.NewAttrStore
|
||||
|
||||
// Run new program.
|
||||
if err := m.Run(); err != nil {
|
||||
if err := m.Start(); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue