158
159
// lifecycles of containers on a machine.
159
160
func (m *Machine) WatchContainers(ctype instance.ContainerType) StringsWatcher {
160
161
members := D{{"parent", m.doc.Id}}
161
match := fmt.Sprintf("^%s/%s/%s$", m.doc.Id, ctype, numberSnippet)
162
match := fmt.Sprintf("^%s/%s/%s$", m.doc.Id, ctype, names.NumberSnippet)
162
163
child := regexp.MustCompile(match)
163
164
filter := func(key interface{}) bool {
164
165
return child.MatchString(key.(string))