Documentation ¶
Overview ¶
Package yamlgraph provides the facilities for loading a graph from a yaml file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GAPI ¶
type GAPI struct { File *string // yaml graph definition to use; nil if undefined // contains filtered or unexported fields }
GAPI implements the main yamlgraph GAPI interface.
type GraphConfig ¶
type GraphConfig struct { Graph string `yaml:"graph"` Resources Resources `yaml:"resources"` Collector []collectorResConfig `yaml:"collect"` Edges []Edge `yaml:"edges"` Comment string `yaml:"comment"` Remote string `yaml:"remote"` }
GraphConfig is the data structure that describes a single graph to run.
func ParseConfigFromFile ¶
func ParseConfigFromFile(filename string) *GraphConfig
ParseConfigFromFile takes a filename and returns the graph config structure.
func (*GraphConfig) NewGraphFromConfig ¶
func (c *GraphConfig) NewGraphFromConfig(hostname string, world gapi.World, noop bool) (*pgraph.Graph, error)
NewGraphFromConfig transforms a GraphConfig struct into a new graph. FIXME: remove any possibly left over, now obsolete graph diff code from here!
func (*GraphConfig) Parse ¶
func (c *GraphConfig) Parse(data []byte) error
Parse parses a data stream into the graph structure.
type Resources ¶
type Resources struct { // in alphabetical order Exec []*resources.ExecRes `yaml:"exec"` File []*resources.FileRes `yaml:"file"` Hostname []*resources.HostnameRes `yaml:"hostname"` Msg []*resources.MsgRes `yaml:"msg"` Noop []*resources.NoopRes `yaml:"noop"` Nspawn []*resources.NspawnRes `yaml:"nspawn"` Password []*resources.PasswordRes `yaml:"password"` Pkg []*resources.PkgRes `yaml:"pkg"` Svc []*resources.SvcRes `yaml:"svc"` Timer []*resources.TimerRes `yaml:"timer"` Virt []*resources.VirtRes `yaml:"virt"` }
Resources is the data structure of the set of resources.
Click to show internal directories.
Click to hide internal directories.