func main() { backend = backends.NewBackend([]string{}) err := topCmd.Execute() if err != nil { log.Fatal(err) } }
func NewListener(dc *docker.Client) *Listener { listener := &Listener{ backend: backends.NewBackend([]string{}), dc: dc, services: make(map[string]*service), containers: make(map[string]*docker.Container), } return listener }
func NewListener(errors chan<- error) (*Listener, error) { listener := &Listener{ backend: backends.NewBackend([]string{}), updates: make(chan model.ServiceUpdate), errors: errors, } go listener.run() return listener, nil }
func main() { backend = backends.NewBackend([]string{}) run() }