resources: Rename the Data struct to ResData to avoid ambiguity
There's a similarly named gapi.Data struct which we could also rename.
This commit is contained in:
@@ -371,7 +371,7 @@ func (obj *Main) Run() error {
|
|||||||
EmbdEtcd: EmbdEtcd,
|
EmbdEtcd: EmbdEtcd,
|
||||||
}
|
}
|
||||||
|
|
||||||
graph.Data = &resources.Data{
|
graph.Data = &resources.ResData{
|
||||||
Hostname: hostname,
|
Hostname: hostname,
|
||||||
Converger: converger,
|
Converger: converger,
|
||||||
Prometheus: prom,
|
Prometheus: prom,
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ type MGraph struct {
|
|||||||
//Graph *pgraph.Graph
|
//Graph *pgraph.Graph
|
||||||
*pgraph.Graph // wrap a graph, and use its methods directly
|
*pgraph.Graph // wrap a graph, and use its methods directly
|
||||||
|
|
||||||
Data *Data
|
Data *ResData
|
||||||
Debug bool
|
Debug bool
|
||||||
|
|
||||||
state graphState
|
state graphState
|
||||||
|
|||||||
@@ -93,8 +93,8 @@ type World interface { // TODO: is there a better name for this interface?
|
|||||||
StrMapDel(namespace string) error
|
StrMapDel(namespace string) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data is the set of input values passed into the pgraph for the resources.
|
// ResData is the set of input values passed into the pgraph for the resources.
|
||||||
type Data struct {
|
type ResData struct {
|
||||||
Hostname string // uuid for the host
|
Hostname string // uuid for the host
|
||||||
//Noop bool
|
//Noop bool
|
||||||
Converger converger.Converger
|
Converger converger.Converger
|
||||||
@@ -183,7 +183,7 @@ type Base interface {
|
|||||||
String() string
|
String() string
|
||||||
Meta() *MetaParams
|
Meta() *MetaParams
|
||||||
Events() chan *event.Event
|
Events() chan *event.Event
|
||||||
Data() *Data
|
Data() *ResData
|
||||||
Working() *bool
|
Working() *bool
|
||||||
Setup(*pgraph.Graph, pgraph.Vertex, Res)
|
Setup(*pgraph.Graph, pgraph.Vertex, Res)
|
||||||
Update(*pgraph.Graph)
|
Update(*pgraph.Graph)
|
||||||
@@ -243,7 +243,7 @@ type BaseRes struct {
|
|||||||
Name string `yaml:"name"`
|
Name string `yaml:"name"`
|
||||||
MetaParams MetaParams `yaml:"meta"` // struct of all the metaparams
|
MetaParams MetaParams `yaml:"meta"` // struct of all the metaparams
|
||||||
|
|
||||||
data Data
|
data ResData
|
||||||
timestamp int64 // last updated timestamp
|
timestamp int64 // last updated timestamp
|
||||||
state ResState
|
state ResState
|
||||||
prefix string // base prefix for this resource
|
prefix string // base prefix for this resource
|
||||||
@@ -459,7 +459,7 @@ func (obj *BaseRes) Events() chan *event.Event {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Data returns an associable handle to some data passed in to the resource.
|
// Data returns an associable handle to some data passed in to the resource.
|
||||||
func (obj *BaseRes) Data() *Data {
|
func (obj *BaseRes) Data() *ResData {
|
||||||
return &obj.data
|
return &obj.data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user