Documentation ¶
Index ¶
- Constants
- func DecryptString(cryptoText string, keyString string) (plainTextString string, err error)
- func EncryptBytes(plainText []byte, keyString string) ([]byte, error)
- func EncryptString(plainText string, keyString string) (string, error)
- func EscapeCtrl(ctrl []byte) (esc []byte)
- func InSlice(slice []string, val string) bool
- func IsNumDot(s string) bool
- func IsStandalone(v *viper.Viper) bool
- type Filter
- type Meta
- type Metas
- type ParametersDescription
- type Task
- type TaskDescription
Constants ¶
const ( AgentStart = "StartAgent" AgentStop = "StopAgent" AgentRestart = "RestartAgent" SinkStart = "StartSink" SinkStop = "StopSink" SinkRestart = "RestartSink" SourceStart = "StartSource" SourceStop = "StopSource" SourceRestart = "RestartSource" SourceQuery = "QuerySource" SourceMeta = "SourceMeta" TaskPending = "PENDING" TaskRunning = "IN_PROGRESS" TaskDone = "SUCCEEDED" TaskOnError = "FAILED" )
Available Task constants
Variables ¶
This section is empty.
Functions ¶
func DecryptString ¶
DecryptString decrypt cryptoText string with keyString key string
func EncryptBytes ¶
EncryptBytes encrypt plainText bytes with keyString key string
func EncryptString ¶
EncryptString encrypt plainText string with keyString key string
func IsStandalone ¶
IsStandalone check if collector is in standalone mode
Types ¶
type Filter ¶
type Filter struct { FilterPolicy string `json:"filter_policy" mapstructure:"filter_policy"` Filter map[string]interface{} `json:"filter"` }
Filter Represents a filter (which will allow to specify the data the user want to replicate or not on the database, schema, table or column level.
func (*Filter) IsFilteredColumn ¶
IsFilteredColumn check if column is filtered
func (*Filter) IsFilteredDatabase ¶
IsFilteredDatabase check if database is filtered
type Meta ¶
type Meta struct { Name string `json:"name"` Timestamp int64 `json:"timestamp"` Value interface{} `json:"value"` }
Meta description a metadata is an indicator send to API
type Metas ¶
type Metas struct { Agent map[string]Meta `json:"agent"` Sources map[string]map[string]Meta `json:"sources"` Sinks map[string]map[string]Meta `json:"sinks"` }
Metas contains all metadata for the collector itself, the configured source and configured sink
func (*Metas) SetMetaSinks ¶
SetMetaSinks Add a metadata to a sink within the Metas struct
func (*Metas) SetMetaSources ¶
SetMetaSources add a metadata to a source within the Metas struct
type ParametersDescription ¶
type ParametersDescription struct { Name string `json:"name"` Description string `json:"description"` Type string `json:"type"` Required bool `json:"required"` }
ParametersDescription parameters description
type Task ¶
type Task struct { ID string `json:"id"` TaskType string `json:"taskType" mapstructure:"taskType"` Target string `json:"target"` CreatedAt int64 `json:"created_at"` StartDate int64 `json:"start_date"` EndDate int64 `json:"end_date"` Status string `json:"status"` Description string `json:"description"` Parameters map[string]interface{} `json:"params" mapstructure:"params"` ErrorDetails string `json:"error_details,omitempty"` }
Task task description a task is an action getted from API
type TaskDescription ¶
type TaskDescription struct { Description string `json:"description"` Parameters []*ParametersDescription `json:"params" mapstructure:"params"` }
TaskDescription task description
func DeclareNewTaskDescription ¶
func DeclareNewTaskDescription(class interface{}, description string) (task *TaskDescription)
DeclareNewTaskDescription Create a new task type by describing it