Documentation
¶
Index ¶
- Variables
- func SampleWorkflowMapJson() string
- func SampleWorkflowMapYaml() string
- type CollectWorkflowMapNode
- func (c *CollectWorkflowMapNode) Add(node interface{}) error
- func (c *CollectWorkflowMapNode) AddConfigItem(ns, key string, value interface{})
- func (c *CollectWorkflowMapNode) AddMetric(ns string, v int) error
- func (c *CollectWorkflowMapNode) GetConfigTree() (*cdata.ConfigDataTree, error)
- func (c *CollectWorkflowMapNode) GetMetrics() []Metric
- func (c *CollectWorkflowMapNode) GetTags() map[string]map[string]string
- func (c *CollectWorkflowMapNode) String(pad string) string
- type Metric
- type ProcessWorkflowMapNode
- type PublishWorkflowMapNode
- type WorkflowMap
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InvalidPayload = errors.New("Payload to convert must be string or []byte")
)
Functions ¶
func SampleWorkflowMapJson ¶
func SampleWorkflowMapJson() string
func SampleWorkflowMapYaml ¶
func SampleWorkflowMapYaml() string
Types ¶
type CollectWorkflowMapNode ¶
type CollectWorkflowMapNode struct { Metrics map[string]metricInfo `json:"metrics"yaml:"metrics"` Config map[string]map[string]interface{} `json:"config,omitempty"yaml:"config"` Tags map[string]map[string]string `json:"tags,omitempty"yaml:"tags"` ProcessNodes []ProcessWorkflowMapNode `json:"process,omitempty"yaml:"process"` PublishNodes []PublishWorkflowMapNode `json:"publish,omitempty"yaml:"publish"` }
func (*CollectWorkflowMapNode) Add ¶
func (c *CollectWorkflowMapNode) Add(node interface{}) error
func (*CollectWorkflowMapNode) AddConfigItem ¶
func (c *CollectWorkflowMapNode) AddConfigItem(ns, key string, value interface{})
func (*CollectWorkflowMapNode) AddMetric ¶
func (c *CollectWorkflowMapNode) AddMetric(ns string, v int) error
func (*CollectWorkflowMapNode) GetConfigTree ¶
func (c *CollectWorkflowMapNode) GetConfigTree() (*cdata.ConfigDataTree, error)
GetConfigTree converts config data for collection node in wmap into a proper cdata.ConfigDataTree
func (*CollectWorkflowMapNode) GetMetrics ¶
func (c *CollectWorkflowMapNode) GetMetrics() []Metric
func (*CollectWorkflowMapNode) GetTags ¶
func (c *CollectWorkflowMapNode) GetTags() map[string]map[string]string
func (*CollectWorkflowMapNode) String ¶
func (c *CollectWorkflowMapNode) String(pad string) string
type ProcessWorkflowMapNode ¶
type ProcessWorkflowMapNode struct { Name string `json:"plugin_name"yaml:"plugin_name"` Version int `json:"plugin_version"yaml:"plugin_version"` ProcessNodes []ProcessWorkflowMapNode `json:"process,omitempty"yaml:"process"` PublishNodes []PublishWorkflowMapNode `json:"publish,omitempty"yaml:"publish"` // TODO processor config Config map[string]interface{} `json:"config,omitempty"yaml:"config"` }
func NewProcessNode ¶
func NewProcessNode(name string, version int) *ProcessWorkflowMapNode
func (*ProcessWorkflowMapNode) Add ¶
func (p *ProcessWorkflowMapNode) Add(node interface{}) error
func (*ProcessWorkflowMapNode) AddConfigItem ¶
func (p *ProcessWorkflowMapNode) AddConfigItem(key string, value interface{})
func (*ProcessWorkflowMapNode) GetConfigNode ¶
func (p *ProcessWorkflowMapNode) GetConfigNode() (*cdata.ConfigDataNode, error)
func (*ProcessWorkflowMapNode) String ¶
func (p *ProcessWorkflowMapNode) String(pad string) string
type PublishWorkflowMapNode ¶
type PublishWorkflowMapNode struct { Name string `json:"plugin_name"yaml:"plugin_name"` Version int `json:"plugin_version"yaml:"plugin_version"` // TODO publisher config Config map[string]interface{} `json:"config,omitempty"yaml:"config"` }
func NewPublishNode ¶
func NewPublishNode(name string, version int) *PublishWorkflowMapNode
func (*PublishWorkflowMapNode) AddConfigItem ¶
func (p *PublishWorkflowMapNode) AddConfigItem(key string, value interface{})
func (*PublishWorkflowMapNode) GetConfigNode ¶
func (p *PublishWorkflowMapNode) GetConfigNode() (*cdata.ConfigDataNode, error)
func (*PublishWorkflowMapNode) String ¶
func (p *PublishWorkflowMapNode) String(pad string) string
type WorkflowMap ¶
type WorkflowMap struct {
CollectNode *CollectWorkflowMapNode `json:"collect"yaml:"collect"`
}
A map of a desired workflow that is used to create a scheduleWorkflow
func FromJson ¶
func FromJson(payload interface{}) (*WorkflowMap, error)
func FromYaml ¶
func FromYaml(payload interface{}) (*WorkflowMap, error)
func NewWorkflowMap ¶
func NewWorkflowMap() *WorkflowMap
func Sample ¶
func Sample() *WorkflowMap
func (*WorkflowMap) String ¶
func (w *WorkflowMap) String() string
func (*WorkflowMap) ToJson ¶
func (w *WorkflowMap) ToJson() ([]byte, error)
func (*WorkflowMap) ToYaml ¶
func (w *WorkflowMap) ToYaml() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.