lib, gapi: Next method of GAPI should generate first event

This puts the generation of the initial event into the Next method of
the GAPI. If it does not happen, then we will never get a graph. This is
important because this notifies the GAPI when we're actually ready to
try and generate a graph, rather than blocking on the Graph method if we
have a long compile for example.

This is also required for the etcd watch cleanup.
This commit is contained in:
James Shubin
2017-04-10 03:15:26 -04:00
parent 6fd5623b1f
commit a4858be967
10 changed files with 170 additions and 79 deletions

View File

@@ -25,10 +25,11 @@ import (
// Data is the set of input values passed into the GAPI structs via Init.
type Data struct {
Hostname string // uuid for the host, required for GAPI
World resources.World
Noop bool
NoWatch bool
Hostname string // uuid for the host, required for GAPI
World resources.World
Noop bool
NoConfigWatch bool
NoStreamWatch bool
// NOTE: we can add more fields here if needed by GAPI endpoints
}