Documentation ¶
Index ¶
- Variables
- func BQErrReason(err error) string
- func BigQueryTableFQNToURN(fqn string) (string, error)
- func BigQueryURN(projectID, datasetID, tableID string) string
- func CaraMLStoreURN(scope, project, featureTable string) string
- func DrainBody(resp *http.Response)
- func GetLog() log.Logger
- func KafkaServersToScope(servers string) string
- func KafkaURN(bootstrapServers, topic string) string
- func NewRetryError(err error) error
- func SetLog(l log.Logger)
- type BaseExtractor
- type BasePlugin
- type Config
- type ConfigError
- type Emit
- type Extractor
- type Info
- type InvalidConfigError
- type NotFoundError
- type Plugin
- type PluginType
- type Processor
- type RetryError
- type Syncer
Constants ¶
This section is empty.
Variables ¶
var ErrEmptyURNScope = errors.New("urn scope is required to generate unique urn")
Functions ¶
func BQErrReason ¶ added in v0.9.2
func BigQueryTableFQNToURN ¶
func BigQueryURN ¶
func CaraMLStoreURN ¶
func DrainBody ¶ added in v0.9.1
DrainBody drains and closes the response body to avoid the following gotcha: http://devs.cloudimmunity.com/gotchas-and-common-mistakes-in-go-golang/index.html#close_http_resp_body
func KafkaServersToScope ¶
func NewRetryError ¶
Types ¶
type BaseExtractor ¶
type BaseExtractor struct { ScopeNotRequired bool BasePlugin }
func NewBaseExtractor ¶
func NewBaseExtractor(info Info, configRef interface{}) BaseExtractor
func (*BaseExtractor) Init ¶
func (p *BaseExtractor) Init(ctx context.Context, config Config) error
Init will be called once before running the plugin. This is where you want to initiate any client or test any connection to external service.
func (*BaseExtractor) Validate ¶
func (p *BaseExtractor) Validate(config Config) error
Validate checks if the given options is valid for the plugin.
type BasePlugin ¶
type BasePlugin struct { UrnScope string RawConfig map[string]interface{} // contains filtered or unexported fields }
func NewBasePlugin ¶
func NewBasePlugin(info Info, configRef interface{}) BasePlugin
func (*BasePlugin) Init ¶
func (p *BasePlugin) Init(ctx context.Context, config Config) error
Init will be called once before running the plugin. This is where you want to initiate any client or test any connection to external service.
func (*BasePlugin) Validate ¶
func (p *BasePlugin) Validate(config Config) error
Validate checks if the given options is valid for the plugin.
type ConfigError ¶
ConfigError contains fields to check error
type Info ¶
type Info struct { Description string `yaml:"description"` SampleConfig string `yaml:"sample_config"` Tags []string `yaml:"tags"` Summary string `yaml:"summary"` }
Info represents the meta.yaml file of a plugin.
type InvalidConfigError ¶
type InvalidConfigError struct { Type PluginType PluginName string Errors []ConfigError }
InvalidConfigError is returned when a plugin's configuration is invalid.
func (InvalidConfigError) Error ¶
func (err InvalidConfigError) Error() string
func (InvalidConfigError) HasError ¶
func (err InvalidConfigError) HasError() bool
type NotFoundError ¶
type NotFoundError struct { Type PluginType Name string }
NotFoundError contains fields required to checks for a missing plugin.
func (NotFoundError) Error ¶
func (err NotFoundError) Error() string
type Plugin ¶
type Plugin interface { // Info returns plugin's information. Info() Info // Validate checks if the given options is valid for the plugin. Validate(config Config) error // Init will be called once before running the plugin. // This is where you want to initiate any client or test any connection to external service. Init(ctx context.Context, config Config) error }
type PluginType ¶
type PluginType string
PluginType is the type of plugin.
const ( PluginTypeExtractor PluginType = "extractor" PluginTypeProcessor PluginType = "processor" PluginTypeSink PluginType = "sink" )
PluginType names
type Processor ¶
type Processor interface { Plugin Process(ctx context.Context, src models.Record) (dst models.Record, err error) }
Processor are the functions that are executed on the extracted data.
type RetryError ¶
type RetryError struct {
Err error
}
RetryError is an error signalling that retry is needed for the operation.
func (RetryError) Error ¶
func (e RetryError) Error() string
func (RetryError) Unwrap ¶
func (e RetryError) Unwrap() error