Files
CrimsonandGitHub 538a2d0de2 chore: Refactor models and other shareable packages into importable pkg (#762)
* Move models and other shareable code to pkg/domain and add own go.mod

* Update all references to use pkg/domain paths

* Fix generated file

* Ensure pkg/domain tests are run by just tests

* Use new models path in connector templates

* Copy local pkg/domain in dockerfile

* Ensure pkg/domain is subject to go generate
2026-06-23 13:08:32 +00:00

28 lines
1.3 KiB
Go

package models
//go:generate mockgen -source plugin_expansion.go -destination plugin_expansion_generated.go -package models
// PluginWithBootstrapOnInstall is an optional upgrade on Plugin. A plugin
// that implements it declares one or more fetch tasks that must run to
// completion (HasMore: false) as part of the install flow, before any of
// the plugin's periodic schedules are registered. The declared tasks run
// sequentially in the returned order.
//
// Dispatcher support is currently narrow: only TASK_FETCH_ACCOUNTS is
// wired through runBootstrapTask. Any other TaskType returned here will
// fail the bootstrap workflow with a non-retryable error at runtime.
// Extending the dispatcher (see runBootstrapTask in
// internal/connectors/engine/workflow/bootstrap_task.go) is required
// before declaring additional task types.
type PluginWithBootstrapOnInstall interface {
BootstrapOnInstall() []TaskType
}
// PluginWithPayoutThrottle is an optional upgrade on Plugin. A plugin that
// implements it signals to the engine that CreatePayout and CreateTransfer
// workflows should run on a dedicated Temporal task queue whose worker has
// TaskQueueActivitiesPerSecond set to the returned value.
type PluginWithPayoutThrottle interface {
PayoutsPerSecond() float64
}