Documentation ¶
Overview ¶
Package gapi is the Graph API implementation for the mcl language frontend.
Index ¶
- Constants
- type GAPI
- func (obj *GAPI) Cli(info *gapi.Info) (*gapi.Deploy, error)
- func (obj *GAPI) Close() error
- func (obj *GAPI) Graph() (*pgraph.Graph, error)
- func (obj *GAPI) Info() *gapi.InfoResult
- func (obj *GAPI) Init(data *gapi.Data) error
- func (obj *GAPI) LangClose() error
- func (obj *GAPI) LangInit(ctx context.Context) error
- func (obj *GAPI) Next() chan gapi.Next
Constants ¶
const (
// Name is the name of this frontend.
Name = "lang"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GAPI ¶
type GAPI struct { InputURI string // input URI of code file system to run // Data is some additional data for the lang struct. Data *lang.Data // contains filtered or unexported fields }
GAPI implements the main lang GAPI interface.
func (*GAPI) Cli ¶
Cli takes an *Info struct, and returns our deploy if activated, and if there are any validation problems, you should return an error. If there is no deploy, then you should return a nil deploy and a nil error. This is passed in a functional file system interface. For standalone usage, this will be a temporary memory-backed filesystem so that the same deploy API is used, and for normal clustered usage, this will be the normal implementation which is usually an etcd backed fs. At this point we should be copying the necessary local file system data into our fs for future use when the GAPI is running. IOW, running this Cli function, when activated, produces a deploy object which is run by our main loop. The difference between running from `deploy` or from `run` (both of which can activate this GAPI) is that `deploy` copies to an etcdFs, and `run` copies to a memFs. All GAPI's run off of the fs that is passed in.
func (*GAPI) Info ¶
func (obj *GAPI) Info() *gapi.InfoResult
Info returns some data about the GAPI implementation.