Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrImporterNameUsed = errors.New("importer name used")
)
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct { runtime.Schema // FactoryFunc is used FactoryFunc FactoryFunc }
Factory creates a new import handler.
type FactoryFunc ¶
type FactoryFunc func(ctx context.Context, app *app.App, config runtime.Section) ([]*Instance, error)
FactoryFunc is called to create a one ore more importer instances from config.
type Handler ¶
type Handler interface { // Import should import data from the external source. // The returned interface is published as an event to // "event/importer/<instance>/done" Import(ctx context.Context) (interface{}, error) }
Handler is capable of importing data from an external source.
type ImportFinsihedEvent ¶
type ImportFunc ¶
ImportFunc implements Handler.
type ImportStartedEvent ¶
type Instance ¶
type Instance struct { ID string Schedule string Handler Handler // contains filtered or unexported fields }
Instance is a import handler instance that executes at a certain schedule.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) Config ¶
func (mng *Manager) Config() *runtime.ConfigSchema
func (*Manager) NotifyChange ¶
Click to show internal directories.
Click to hide internal directories.