gapi: Move separate etcd Watch method into GAPI

This cleans up the API to not have a special case for etcd anymore. In
particular, this also adds the requirement that the GAPI must generate
an event on startup as soon as it is ready to generate a graph.
This commit is contained in:
James Shubin
2017-03-20 15:10:27 -04:00
parent 66d9c7091c
commit 6fd5623b1f
6 changed files with 62 additions and 40 deletions

View File

@@ -75,6 +75,7 @@ const refreshPathToken = "refresh"
// the GAPI to store state and exchange information throughout the cluster. It
// is the interface each machine uses to communicate with the rest of the world.
type World interface { // TODO: is there a better name for this interface?
ResWatch() chan error
ResExport([]Res) error
// FIXME: should this method take a "filter" data struct instead of many args?
ResCollect(hostnameFilter, kindFilter []string) ([]Res, error)