func (ovr *Overseer) ListGroup(group string) []string {
	ids := []string{}
	ovr.procs.Range(func(id, c interface{}) bool {
		if c.(*Cmd).Group == group {
			ids = append(ids, id.(string))
		}
		return true
	})
	sort.Strings(ids)
	return ids
}
ListGroup returns the names of all the procs from a specific group.
package overseer
import (
	"errors"
	"fmt"
	"math/rand"
	"os"
	"os/signal"
	"sort"
	"sync"
	"syscall"
	"time"
	ml "github.com/ShinyTrinkets/meta-logger"
)
const timeUnit = 100 * time.Millisecond
type (
	Attrs = ml.Attrs
	Logger = ml.Logger
)
type Overseer struct {
	access    *sync.RWMutex
	stateLock *sync.RWMutex
	procs     sync.Map  
	watchers  []chan *ProcessJSON
	loggers   []chan *LogMsg
	state     OvrState
}
type ProcessJSON struct {
	ID         string    `json:"id"`
	Group      string    `json:"group"`
	Cmd        string    `json:"cmd"`
	Dir        string    `json:"dir"`
	PID        int       `json:"PID"`
	State      string    `json:"state"`
	ExitCode   int       `json:"exitCode"`  
	Error      error     `json:"error"`     
	StartTime  time.Time `json:"startTime"`
	DelayStart uint      `json:"delayStart"`
	RetryTimes uint      `json:"retryTimes"`
}
type LogMsg struct {
	Type uint8
	Text string
}
var log ml.Logger
var once sync.Once
func SetupLogBuilder(b ml.LogBuilderType) {
	ml.SetupLogBuilder(b)
}
func NewOverseer() *Overseer {
	once.Do(func() {
		if ml.NewLogger == nil {
			ml.SetupLogBuilder(func(name string) Logger {
				return &ml.DefaultLogger{Name: name}
			})
		}
		log = ml.NewLogger("overseer")
	})
	rand.Seed(time.Now().UTC().UnixNano())
	ovr := &Overseer{
		access:    &sync.RWMutex{},
		stateLock: &sync.RWMutex{},
	}
	sigChannel := make(chan os.Signal, 2)
	signal.Notify(sigChannel, syscall.SIGINT, syscall.SIGTERM)
	go func() {
		for sig := range sigChannel {
			log.Error("Received signal: %v!", Attrs{"sig": sig})
			ovr.StopAll(false)
		}
	}()
	return ovr
}
func (ovr *Overseer) ListAll() []string {
	ids := []string{}
	ovr.procs.Range(func(id, c interface{}) bool {
		ids = append(ids, id.(string))
		return true
	})
	sort.Strings(ids)
	return ids
}