Documentation ¶
Overview ¶
Package gconfig 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 GraphConfig ¶
type GraphConfig struct { Graph string `yaml:"graph"` Resources struct { Noop []*resources.NoopRes `yaml:"noop"` Pkg []*resources.PkgRes `yaml:"pkg"` File []*resources.FileRes `yaml:"file"` Svc []*resources.SvcRes `yaml:"svc"` Exec []*resources.ExecRes `yaml:"exec"` Timer []*resources.TimerRes `yaml:"timer"` Msg []*resources.MsgRes `yaml:"msg"` } `yaml:"resources"` Collector []collectorResConfig `yaml:"collect"` Edges []edgeConfig `yaml:"edges"` Comment string `yaml:"comment"` Hostname string `yaml:"hostname"` // uuid for the host 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(g *pgraph.Graph, embdEtcd *etcd.EmbdEtcd, noop bool) (*pgraph.Graph, error)
NewGraphFromConfig returns a new graph from existing input, such as from the existing graph, and a GraphConfig struct.
func (*GraphConfig) Parse ¶
func (c *GraphConfig) Parse(data []byte) error
Parse parses a data stream into the graph structure.
Click to show internal directories.
Click to hide internal directories.