Documentation
¶
Index ¶
- Constants
- Variables
- func InitConfManagers()
- func Read() (osrelease map[string]string, err error)
- func ReadFile(filename string) (osrelease map[string]string, err error)
- func ReadString(content string) (osrelease map[string]string, err error)
- func StartUp(Version string)
- type ConfManager
- type Configuration
- type ConnectionRequest
- type ConnectionResponse
- type DatasourceExport
- type ImportConfigurationStatus
- type InstallScriptGetter
- type MetaConfiguration
- type Metrics
- type RuleMigrationProcessor
- type RuleRegistry
- type RuleStatusMetricsValue
- type UpdateRuleStateType
Constants ¶
View Source
const ( EtcOsRelease string = "/etc/os-release" UsrLibOsRelease string = "/usr/lib/os-release" )
View Source
const ( ContentType = "Content-Type" ContentTypeJSON = "application/json" )
Variables ¶
View Source
var ( NativeSourcePlugin = []string{"random", "zmq", "sql", "video", "kafka"} NativeSinkPlugin = []string{"image", "influx", "influx2", "tdengine", "zmq", "kafka", "sql"} NativeFunctionPlugin = []string{"accumulateWordCount", "countPlusOne", "echo", "geohash", "image", "labelImage", "tfLite"} )
Functions ¶
func InitConfManagers ¶
func InitConfManagers()
func Read ¶
Read and return os-release, trying EtcOsRelease, followed by UsrLibOsRelease. err will contain an error message if neither file exists or failed to parse
func ReadString ¶
ReadString is similar to Read(), but takes a string to load instead
Types ¶
type ConfManager ¶
type Configuration ¶
type Configuration struct {
Streams map[string]string `json:"streams"`
Tables map[string]string `json:"tables"`
Rules map[string]string `json:"rules"`
NativePlugins map[string]string `json:"nativePlugins"`
PortablePlugins map[string]string `json:"portablePlugins"`
SourceConfig map[string]string `json:"sourceConfig"`
SinkConfig map[string]string `json:"sinkConfig"`
ConnectionConfig map[string]string `json:"connectionConfig"`
Service map[string]string `json:"Service"`
Schema map[string]string `json:"Schema"`
Uploads map[string]string `json:"uploads"`
Scripts map[string]string `json:"scripts"`
}
type ConnectionRequest ¶
type ConnectionResponse ¶
type DatasourceExport ¶
type DatasourceExport struct {
SQL string `json:"sql" yaml:"sql"`
}
type ImportConfigurationStatus ¶
type ImportConfigurationStatus struct {
ErrorMsg string
ConfigResponse Configuration
}
type InstallScriptGetter ¶
type MetaConfiguration ¶
type MetaConfiguration struct {
SourceConfig map[string]map[string]any `json:"sourceConfig,omitempty" yaml:"sourceConfig,omitempty"`
SinkConfig map[string]map[string]any `json:"sinkConfig,omitempty" yaml:"sinkConfig,omitempty"`
ConnectionConfig map[string]map[string]any `json:"connectionConfig,omitempty" yaml:"connectionConfig,omitempty"`
// plugins
PortablePlugins map[string]*plugin.IOPlugin `json:"portablePlugins,omitempty" yaml:"portablePlugins,omitempty"`
// others
Service map[string]*service.ServiceCreationRequest `json:"service,omitempty" yaml:"service,omitempty"`
Schema map[string]*schema.Info `json:"schema,omitempty" yaml:"schema,omitempty"`
Uploads map[string]*fileContent `json:"uploads,omitempty" yaml:"uploads,omitempty"`
// rules related
Streams map[string]*DatasourceExport `json:"streams" yaml:"streams"`
Tables map[string]*DatasourceExport `json:"tables" yaml:"tables"`
Rules map[string]*def.Rule `json:"rules" yaml:"rules"`
}
func GenMetaConfiguration ¶
func GenMetaConfiguration() (*MetaConfiguration, error)
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶
func NewMetrics() *Metrics
func (*Metrics) GetCpuUsage ¶
func (*Metrics) GetMemoryUsage ¶
type RuleMigrationProcessor ¶
type RuleMigrationProcessor struct {
// contains filtered or unexported fields
}
func NewRuleMigrationProcessor ¶
func NewRuleMigrationProcessor(r *processor.RuleProcessor, s *processor.StreamProcessor) *RuleMigrationProcessor
func (*RuleMigrationProcessor) ConfigurationPartialExport ¶
func (p *RuleMigrationProcessor) ConfigurationPartialExport(rules []string) ([]byte, error)
type RuleRegistry ¶
func (*RuleRegistry) Delete ¶
func (rr *RuleRegistry) Delete(key string) (*rule.RuleState, bool)
Delete Atomic get and delete. Only run when deleting a rule in runtime.
type RuleStatusMetricsValue ¶
type RuleStatusMetricsValue int
const ( RuleStoppedByError RuleStatusMetricsValue = -1 RuleStopped RuleStatusMetricsValue = 0 RuleRunning RuleStatusMetricsValue = 1 )
type UpdateRuleStateType ¶
type UpdateRuleStateType int
const ( UpdateRuleState UpdateRuleStateType = iota UpdateRuleOffset )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.