services

package
v0.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 38 Imported by: 0

Documentation

Overview

Package services wires github.com/goliatone/go-services into go-admin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterServiceMigrations

func RegisterServiceMigrations(client *persistence.Client, opts ...ServiceMigrationsOption) error

RegisterServiceMigrations registers go-auth, go-users, and go-services migrations in dependency order. App-local sources are registered last.

Types

type APIConfig

type APIConfig struct {
	Enabled                      bool              `koanf:"enabled" mapstructure:"enabled"`
	RequireIdempotencyKey        bool              `koanf:"require_idempotency_key" mapstructure:"require_idempotency_key"`
	IdempotencyTTL               time.Duration     `koanf:"idempotency_ttl" mapstructure:"idempotency_ttl"`
	ActivityActionLabelOverrides map[string]string `koanf:"activity_action_label_overrides" mapstructure:"activity_action_label_overrides"`
}

APIConfig controls admin services API route registration behavior.

type AppMigrationSource

type AppMigrationSource struct {
	Label      string
	Filesystem fs.FS
}

AppMigrationSource describes app-local migrations to register after go-services.

type CallbackURLConfig

type CallbackURLConfig struct {
	Strict bool `koanf:"strict" mapstructure:"strict"`

	// PublicBaseURL overrides request-origin derived callback URL roots (scheme/host/path prefix).
	PublicBaseURL string `koanf:"public_base_url" mapstructure:"public_base_url"`

	// URLKitGroup overrides the URLKit group used to resolve callback routes.
	// Defaults to admin.AdminAPIGroup().
	URLKitGroup string `koanf:"urlkit_group" mapstructure:"urlkit_group"`

	// DefaultRoute is the URLKit route key used when no provider-specific route exists.
	DefaultRoute string `koanf:"default_route" mapstructure:"default_route"`

	// ProviderRoutes maps provider IDs to URLKit route keys.
	ProviderRoutes map[string]string `koanf:"provider_routes" mapstructure:"provider_routes"`

	// ProviderURLOverrides maps provider IDs to absolute callback URLs.
	ProviderURLOverrides map[string]string `koanf:"provider_url_overrides" mapstructure:"provider_url_overrides"`
}

CallbackURLConfig controls callback URL resolution for OAuth/re-consent flows.

type CommandQueryBundleFactory

type CommandQueryBundleFactory = goservices.CommandQueryBundleFactory

CommandQueryBundleFactory aliases go-services extension bundle factory contracts.

type Config

type Config struct {
	Enabled bool `koanf:"enabled" mapstructure:"enabled"`

	// Service runtime configuration consumed by go-services.
	Service     goservices.Config            `koanf:"service" mapstructure:"service"`
	Inheritance goservices.InheritanceConfig `koanf:"inheritance" mapstructure:"inheritance"`

	// ConfigValues is loaded through go-config/cfgx and merged via go-options.
	ConfigValues map[string]any `koanf:"config" mapstructure:"config"`

	// PersistenceClient defaults to go-persistence-bun client used for SQL stores.
	PersistenceClient *persistence.Client `koanf:"-" mapstructure:"-"`

	// RepositoryFactory optionally overrides default go-services SQL repository factory wiring.
	RepositoryFactory any `koanf:"-" mapstructure:"-"`

	// SecretProvider optionally overrides app-key secret provider wiring.
	SecretProvider SecretProvider `koanf:"-" mapstructure:"-"`

	// Encryption key material for default app-key secret provider.
	EncryptionKey     string `koanf:"encryption_key" mapstructure:"encryption_key"`
	EncryptionKeyID   string `koanf:"encryption_key_id" mapstructure:"encryption_key_id"`
	EncryptionVersion int    `koanf:"encryption_version" mapstructure:"encryption_version"`

	// Providers are registered on startup in deterministic order.
	Providers []Provider `koanf:"-" mapstructure:"-"`
	Registry  Registry   `koanf:"-" mapstructure:"-"`

	// Optional module-level logging/error wiring.
	LoggerProvider goadmin.LoggerProvider `koanf:"-" mapstructure:"-"`
	Logger         goadmin.Logger         `koanf:"-" mapstructure:"-"`
	ErrorFactory   ErrorFactory           `koanf:"-" mapstructure:"-"`
	ErrorMapper    ErrorMapper            `koanf:"-" mapstructure:"-"`

	// Optional overrides for go-services config loading/layering.
	ConfigProvider  ConfigProvider  `koanf:"-" mapstructure:"-"`
	OptionsResolver OptionsResolver `koanf:"-" mapstructure:"-"`

	// RegisterMigrations defaults to true when nil.
	RegisterMigrations *bool `koanf:"register_migrations" mapstructure:"register_migrations"`

	// Validation targets used when registering dialect-aware migrations.
	ValidationTargets []string `koanf:"validation_targets" mapstructure:"validation_targets"`

	// AppMigrations are registered after go-auth/go-users/go-services in dependency order.
	AppMigrations []AppMigrationSource `koanf:"-" mapstructure:"-"`

	// TableLifecycleHooks run after migration registration and before service startup.
	TableLifecycleHooks []TableLifecycleHook `koanf:"-" mapstructure:"-"`

	// Lifecycle runtime/projector config surface.
	Lifecycle LifecycleConfig `koanf:"lifecycle" mapstructure:"lifecycle"`

	// Admin services API/runtime integration controls.
	API        APIConfig         `koanf:"api" mapstructure:"api"`
	Callbacks  CallbackURLConfig `koanf:"callbacks" mapstructure:"callbacks"`
	Worker     WorkerConfig      `koanf:"worker" mapstructure:"worker"`
	Webhook    WebhookConfig     `koanf:"webhook" mapstructure:"webhook"`
	Inbound    InboundConfig     `koanf:"inbound" mapstructure:"inbound"`
	Extensions ExtensionsConfig  `koanf:"extensions" mapstructure:"extensions"`

	// Optional worker/inbound/webhook runtime adapters.
	JobEnqueuer           JobEnqueuer           `koanf:"-" mapstructure:"-"`
	WebhookVerifier       WebhookVerifier       `koanf:"-" mapstructure:"-"`
	WebhookHandler        WebhookHandler        `koanf:"-" mapstructure:"-"`
	WebhookDeliveryLedger WebhookDeliveryLedger `koanf:"-" mapstructure:"-"`
	InboundVerifier       InboundVerifier       `koanf:"-" mapstructure:"-"`
	InboundHandlers       []InboundHandler      `koanf:"-" mapstructure:"-"`
	InboundClaimStore     InboundClaimStore     `koanf:"-" mapstructure:"-"`
}

Config controls go-admin services module wiring.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns module defaults aligned with SERVICES_TDD.md.

type ConfigProvider

type ConfigProvider = gocore.ConfigProvider

ConfigProvider aliases go-services config loading contracts into the adapter package.

type ErrorFactory

type ErrorFactory = gocore.ErrorFactory

ErrorFactory aliases go-services error factory contracts into the adapter package.

type ErrorMapper

type ErrorMapper = gocore.ErrorMapper

ErrorMapper aliases go-services error mapper contracts into the adapter package.

type ExtensionDiagnostics

type ExtensionDiagnostics struct {
	RegisteredProviderPacks  []string        `json:"registered_provider_packs"`
	EnabledProviderPacks     []string        `json:"enabled_provider_packs"`
	DisabledProviderPacks    []string        `json:"disabled_provider_packs"`
	CommandQueryBundles      []string        `json:"command_query_bundles"`
	BuiltCommandQueryBundles []string        `json:"built_command_query_bundles"`
	LifecycleSubscribers     []string        `json:"lifecycle_subscribers"`
	FeatureFlags             map[string]bool `json:"feature_flags"`
}

ExtensionDiagnostics exposes resolved extension wiring state for downstream integrations.

type ExtensionsConfig

type ExtensionsConfig struct {
	EnabledProviderPacks []string        `koanf:"enabled_provider_packs" mapstructure:"enabled_provider_packs"`
	FeatureFlags         map[string]bool `koanf:"feature_flags" mapstructure:"feature_flags"`
	DiagnosticsEnabled   bool            `koanf:"diagnostics_enabled" mapstructure:"diagnostics_enabled"`
}

ExtensionsConfig controls downstream package integration points and diagnostics.

type InboundClaimStore

type InboundClaimStore = gocore.IdempotencyClaimStore

InboundClaimStore aliases go-services inbound idempotency claim store contracts into the adapter package.

type InboundConfig

type InboundConfig struct {
	Enabled bool          `koanf:"enabled" mapstructure:"enabled"`
	KeyTTL  time.Duration `koanf:"key_ttl" mapstructure:"key_ttl"`
}

InboundConfig controls inbound dispatcher defaults.

type InboundHandler

type InboundHandler = gocore.InboundHandler

InboundHandler aliases go-services inbound handler contracts into the adapter package.

type InboundVerifier

type InboundVerifier = goservicesinbound.Verifier

InboundVerifier aliases go-services inbound verification contracts into the adapter package.

type JobEnqueuer

type JobEnqueuer = gocore.JobEnqueuer

JobEnqueuer aliases go-services job enqueue contracts into the adapter package.

type LifecycleActivityProjectorConfig

type LifecycleActivityProjectorConfig struct {
	Enabled            bool                 `koanf:"enabled" mapstructure:"enabled"`
	BufferSize         int                  `koanf:"buffer_size" mapstructure:"buffer_size"`
	FallbackBufferSize int                  `koanf:"fallback_buffer_size" mapstructure:"fallback_buffer_size"`
	RetentionTTL       time.Duration        `koanf:"retention_ttl" mapstructure:"retention_ttl"`
	RetentionRowCap    int                  `koanf:"retention_row_cap" mapstructure:"retention_row_cap"`
	PrimarySink        ServicesActivitySink `koanf:"-" mapstructure:"-"`
	FallbackSink       ServicesActivitySink `koanf:"-" mapstructure:"-"`
}

LifecycleActivityProjectorConfig controls activity projector runtime wiring.

type LifecycleConfig

type LifecycleConfig struct {
	Dispatcher LifecycleDispatcherConfig `koanf:"dispatcher" mapstructure:"dispatcher"`
	Projectors LifecycleProjectorsConfig `koanf:"projectors" mapstructure:"projectors"`
}

LifecycleConfig exposes module lifecycle runtime surface.

type LifecycleDispatcherConfig

type LifecycleDispatcherConfig struct {
	Enabled        bool          `koanf:"enabled" mapstructure:"enabled"`
	BatchSize      int           `koanf:"batch_size" mapstructure:"batch_size"`
	MaxAttempts    int           `koanf:"max_attempts" mapstructure:"max_attempts"`
	InitialBackoff time.Duration `koanf:"initial_backoff" mapstructure:"initial_backoff"`
}

LifecycleDispatcherConfig controls outbox dispatcher runtime defaults.

type LifecycleEventHandler

type LifecycleEventHandler = gocore.LifecycleEventHandler

LifecycleEventHandler aliases go-services lifecycle event handlers for custom projector subscribers.

type LifecycleNotificationsProjectorConfig

type LifecycleNotificationsProjectorConfig struct {
	Enabled            bool                           `koanf:"enabled" mapstructure:"enabled"`
	DefinitionMap      map[string]string              `koanf:"definition_map" mapstructure:"definition_map"`
	DefinitionResolver NotificationDefinitionResolver `koanf:"-" mapstructure:"-"`
	RecipientResolver  NotificationRecipientResolver  `koanf:"-" mapstructure:"-"`
	Sender             NotificationSender             `koanf:"-" mapstructure:"-"`
}

LifecycleNotificationsProjectorConfig controls notifications projector wiring.

type LifecycleProjectorsConfig

type LifecycleProjectorsConfig struct {
	Activity      LifecycleActivityProjectorConfig      `koanf:"activity" mapstructure:"activity"`
	Notifications LifecycleNotificationsProjectorConfig `koanf:"notifications" mapstructure:"notifications"`
	Subscribers   []LifecycleSubscriberConfig           `koanf:"-" mapstructure:"-"`
}

LifecycleProjectorsConfig groups projector switches for lifecycle fan-out.

type LifecycleSubscriberConfig

type LifecycleSubscriberConfig struct {
	Name    string
	Handler LifecycleEventHandler
}

LifecycleSubscriberConfig maps a named subscriber into lifecycle projector fan-out.

type MigrationObserver

type MigrationObserver func(MigrationRegistration)

MigrationObserver receives ordered migration registration events.

type MigrationRegistration

type MigrationRegistration struct {
	Label string
}

MigrationRegistration records an ordered migration registration step.

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module stores resolved go-services wiring for go-admin runtime integration.

func Setup

func Setup(adminApp *goadmin.Admin, cfg Config, opts ...Option) (*Module, error)

Setup wires go-services into an existing go-admin app.

func (*Module) Config

func (m *Module) Config() Config

Config returns the resolved module configuration.

func (*Module) ExtensionBundles

func (m *Module) ExtensionBundles() map[string]any

ExtensionBundles returns built downstream command/query bundle wiring.

func (*Module) ExtensionDiagnostics

func (m *Module) ExtensionDiagnostics() ExtensionDiagnostics

ExtensionDiagnostics returns extension hook registration diagnostics.

func (*Module) Facade

func (m *Module) Facade() *goservices.Facade

Facade returns grouped command/query handlers for transport adapters.

func (*Module) LifecycleConfig

func (m *Module) LifecycleConfig() LifecycleConfig

LifecycleConfig returns the resolved lifecycle/projector settings.

func (*Module) List

List implements go-services query.ServicesActivityReader for facade activity queries.

func (*Module) RepositoryFactory

func (m *Module) RepositoryFactory() any

RepositoryFactory returns the resolved store repository factory wiring.

func (*Module) Runtime

func (m *Module) Runtime() RuntimeContracts

Runtime returns resolved logger/runtime adapter bridges.

func (*Module) Service

func (m *Module) Service() *goservices.Service

Service returns the resolved go-services runtime instance.

func (*Module) Worker

func (m *Module) Worker() *WorkerRuntime

Worker returns the resolved async worker runtime adapter.

type NotificationDefinitionResolver

type NotificationDefinitionResolver = gocore.NotificationDefinitionResolver

NotificationDefinitionResolver aliases go-services notification definition resolver contracts.

type NotificationRecipientResolver

type NotificationRecipientResolver = gocore.NotificationRecipientResolver

NotificationRecipientResolver aliases go-services notification recipient resolver contracts.

type NotificationSender

type NotificationSender = gocore.NotificationSender

NotificationSender aliases go-services notification sender contracts into the adapter package.

type Option

type Option func(*setupOptions)

Option mutates setup-time module wiring.

func WithActivityActionLabelOverrides

func WithActivityActionLabelOverrides(overrides map[string]string) Option

WithActivityActionLabelOverrides configures action label overrides returned by the activity API.

func WithActivitySinks

func WithActivitySinks(primary ServicesActivitySink, fallback ServicesActivitySink) Option

WithActivitySinks overrides activity primary/fallback sink wiring.

func WithCallbackURLConfig

func WithCallbackURLConfig(config CallbackURLConfig) Option

WithCallbackURLConfig overrides callback URL resolution settings used by connect/re-consent flows.

func WithCommandQueryBundle

func WithCommandQueryBundle(name string, factory goservices.CommandQueryBundleFactory) Option

WithCommandQueryBundle registers a downstream command/query bundle factory.

func WithConfigProvider

func WithConfigProvider(provider ConfigProvider) Option

WithConfigProvider overrides go-config loader wiring.

func WithEnabledProviderPacks

func WithEnabledProviderPacks(names ...string) Option

WithEnabledProviderPacks overrides enabled extension provider-pack names.

func WithErrorFactory

func WithErrorFactory(factory ErrorFactory) Option

WithErrorFactory overrides go-errors factory wiring passed into go-services.

func WithErrorMapper

func WithErrorMapper(mapper ErrorMapper) Option

WithErrorMapper overrides go-errors mapping used by go-services.

func WithExtensionDiagnosticsEnabled

func WithExtensionDiagnosticsEnabled(enabled bool) Option

WithExtensionDiagnosticsEnabled toggles extension diagnostics surfaces.

func WithExtensionFeatureFlags

func WithExtensionFeatureFlags(flags map[string]bool) Option

WithExtensionFeatureFlags merges extension feature-flag overrides into module config.

func WithExtensionHooks

func WithExtensionHooks(hooks *goservices.ExtensionHooks) Option

WithExtensionHooks overrides module-level extension hooks registry wiring.

func WithExtensionLifecycleSubscriber

func WithExtensionLifecycleSubscriber(name string, handler LifecycleEventHandler) Option

WithExtensionLifecycleSubscriber registers a downstream lifecycle subscriber hook.

func WithInboundClaimStore

func WithInboundClaimStore(store InboundClaimStore) Option

WithInboundClaimStore overrides inbound claim-store wiring.

func WithInboundHandler

func WithInboundHandler(handler InboundHandler) Option

WithInboundHandler registers an inbound surface handler.

func WithInboundVerifier

func WithInboundVerifier(verifier InboundVerifier) Option

WithInboundVerifier overrides inbound signature verification wiring.

func WithJobEnqueuer

func WithJobEnqueuer(enqueuer JobEnqueuer) Option

WithJobEnqueuer overrides async worker enqueue wiring used by services API handlers.

func WithLifecycleConfig

func WithLifecycleConfig(config LifecycleConfig) Option

WithLifecycleConfig overrides lifecycle dispatcher/projector config.

func WithLifecycleNotificationDefinitionResolver

func WithLifecycleNotificationDefinitionResolver(resolver NotificationDefinitionResolver) Option

WithLifecycleNotificationDefinitionResolver overrides definition resolution wiring.

func WithLifecycleNotificationRecipientResolver

func WithLifecycleNotificationRecipientResolver(resolver NotificationRecipientResolver) Option

WithLifecycleNotificationRecipientResolver overrides recipient resolution wiring.

func WithLifecycleNotificationSender

func WithLifecycleNotificationSender(sender NotificationSender) Option

WithLifecycleNotificationSender overrides lifecycle notifications sender wiring.

func WithLifecycleSubscriber

func WithLifecycleSubscriber(name string, handler LifecycleEventHandler) Option

WithLifecycleSubscriber registers a named custom lifecycle projector subscriber.

func WithLogger

func WithLogger(logger goadmin.Logger) Option

WithLogger overrides logger wiring for go-services and worker adapters.

func WithLoggerProvider

func WithLoggerProvider(provider goadmin.LoggerProvider) Option

WithLoggerProvider overrides logger provider wiring for go-services and worker adapters.

func WithMigrationOptions

func WithMigrationOptions(options ...ServiceMigrationsOption) Option

WithMigrationOptions appends migration registration options.

func WithOptionsResolver

func WithOptionsResolver(resolver OptionsResolver) Option

WithOptionsResolver overrides go-options layering wiring.

func WithPersistenceClient

func WithPersistenceClient(client *persistence.Client) Option

WithPersistenceClient overrides persistence client wiring.

func WithProvider

func WithProvider(provider Provider) Option

WithProvider appends provider registrations performed at startup.

func WithProviderPack

func WithProviderPack(name string, providers ...Provider) Option

WithProviderPack registers a downstream provider pack for module bootstrap.

func WithRegisterMigrations

func WithRegisterMigrations(enabled bool) Option

WithRegisterMigrations overrides migration registration behavior.

func WithRegistry

func WithRegistry(registry Registry) Option

WithRegistry overrides provider registry wiring.

func WithRepositoryFactory

func WithRepositoryFactory(factory any) Option

WithRepositoryFactory overrides repository factory wiring.

func WithSecretProvider

func WithSecretProvider(provider SecretProvider) Option

WithSecretProvider overrides secret provider wiring.

func WithTableLifecycleHook

func WithTableLifecycleHook(hook TableLifecycleHook) Option

WithTableLifecycleHook registers a setup hook executed with the resolved Bun DB.

func WithWebhookDeliveryLedger

func WithWebhookDeliveryLedger(ledger WebhookDeliveryLedger) Option

WithWebhookDeliveryLedger overrides webhook delivery claim ledger wiring.

func WithWebhookHandler

func WithWebhookHandler(handler WebhookHandler) Option

WithWebhookHandler overrides webhook dispatch handling.

func WithWebhookVerifier

func WithWebhookVerifier(verifier WebhookVerifier) Option

WithWebhookVerifier overrides webhook signature verification wiring.

type OptionsResolver

type OptionsResolver = gocore.OptionsResolver

OptionsResolver aliases go-services options layering contracts into the adapter package.

type Provider

type Provider = gocore.Provider

Provider aliases go-services provider contracts into the adapter package.

type ProviderPack

type ProviderPack = goservices.ProviderPack

ProviderPack aliases go-services extension provider-pack contracts into the adapter package.

type Registry

type Registry = gocore.Registry

Registry aliases go-services provider registry contracts into the adapter package.

type RuntimeContracts

type RuntimeContracts struct {
	LoggerProvider    goadmin.LoggerProvider
	Logger            goadmin.Logger
	JobLoggerProvider any
	JobLogger         any
}

RuntimeContracts exposes resolved logger/runtime bridges for async worker wiring.

type SecretProvider

type SecretProvider = gocore.SecretProvider

SecretProvider aliases go-services secret provider contracts into the adapter package.

type ServiceMigrationsOption

type ServiceMigrationsOption func(*serviceMigrationsOptions)

ServiceMigrationsOption customizes RegisterServiceMigrations behavior.

func WithServiceMigrationsAppSource

func WithServiceMigrationsAppSource(label string, fsys fs.FS) ServiceMigrationsOption

WithServiceMigrationsAppSource appends an app-local dialect-aware migration source.

func WithServiceMigrationsAuthEnabled

func WithServiceMigrationsAuthEnabled(enabled bool) ServiceMigrationsOption

WithServiceMigrationsAuthEnabled toggles go-auth migration registration.

func WithServiceMigrationsAuthFS

func WithServiceMigrationsAuthFS(fsys fs.FS) ServiceMigrationsOption

WithServiceMigrationsAuthFS overrides the go-auth migrations filesystem.

func WithServiceMigrationsObserver

func WithServiceMigrationsObserver(observer MigrationObserver) ServiceMigrationsOption

WithServiceMigrationsObserver captures ordered migration registration steps.

func WithServiceMigrationsServicesEnabled

func WithServiceMigrationsServicesEnabled(enabled bool) ServiceMigrationsOption

WithServiceMigrationsServicesEnabled toggles go-services migration registration.

func WithServiceMigrationsServicesFS

func WithServiceMigrationsServicesFS(fsys fs.FS) ServiceMigrationsOption

WithServiceMigrationsServicesFS overrides the go-services migrations filesystem.

func WithServiceMigrationsUsersEnabled

func WithServiceMigrationsUsersEnabled(enabled bool) ServiceMigrationsOption

WithServiceMigrationsUsersEnabled toggles go-users migration registration.

func WithServiceMigrationsUsersFS

func WithServiceMigrationsUsersFS(fsys fs.FS) ServiceMigrationsOption

WithServiceMigrationsUsersFS overrides the go-users migrations filesystem.

func WithServiceMigrationsValidationTargets

func WithServiceMigrationsValidationTargets(targets ...string) ServiceMigrationsOption

WithServiceMigrationsValidationTargets overrides dialect validation targets.

type ServicesActivitySink

type ServicesActivitySink = gocore.ServicesActivitySink

ServicesActivitySink aliases go-services activity sink contracts into the adapter package.

type TableLifecycleHook

type TableLifecycleHook func(ctx context.Context, db *bun.DB) error

TableLifecycleHook runs after migration registration and before service startup. Hooks can be used to register table-specific operational wiring.

type WebhookConfig

type WebhookConfig struct {
	Enabled     bool          `koanf:"enabled" mapstructure:"enabled"`
	ClaimLease  time.Duration `koanf:"claim_lease" mapstructure:"claim_lease"`
	MaxAttempts int           `koanf:"max_attempts" mapstructure:"max_attempts"`
}

WebhookConfig controls webhook processor defaults.

type WebhookDeliveryLedger

type WebhookDeliveryLedger = goserviceswebhooks.DeliveryLedger

WebhookDeliveryLedger aliases go-services webhook delivery claim ledger contracts.

type WebhookHandler

type WebhookHandler = goserviceswebhooks.Handler

WebhookHandler aliases go-services webhook handler contracts into the adapter package.

type WebhookVerifier

type WebhookVerifier = goserviceswebhooks.Verifier

WebhookVerifier aliases go-services webhook verification contracts into the adapter package.

type WorkerConfig

type WorkerConfig struct {
	Enabled bool `koanf:"enabled" mapstructure:"enabled"`
}

WorkerConfig controls async worker adapter wiring.

type WorkerRuntime

type WorkerRuntime struct {
	// contains filtered or unexported fields
}

func (*WorkerRuntime) EnqueueActivityRetentionRun

func (w *WorkerRuntime) EnqueueActivityRetentionRun(ctx context.Context, idempotencyKey string) error

func (*WorkerRuntime) EnqueueOutboxDispatch

func (w *WorkerRuntime) EnqueueOutboxDispatch(ctx context.Context, batchSize int, idempotencyKey string) error

func (*WorkerRuntime) EnqueueRefresh

func (w *WorkerRuntime) EnqueueRefresh(ctx context.Context, req gocore.RefreshRequest, idempotencyKey string) error

func (*WorkerRuntime) EnqueueSubscriptionRenew

func (w *WorkerRuntime) EnqueueSubscriptionRenew(ctx context.Context, subscriptionID string, metadata map[string]any, idempotencyKey string) error

func (*WorkerRuntime) EnqueueSyncRun

func (w *WorkerRuntime) EnqueueSyncRun(
	ctx context.Context,
	connectionID string,
	providerID string,
	resourceType string,
	resourceID string,
	metadata map[string]any,
	idempotencyKey string,
) error

func (*WorkerRuntime) EnqueueWebhook

func (w *WorkerRuntime) EnqueueWebhook(ctx context.Context, req gocore.InboundRequest) error

func (*WorkerRuntime) HandleExecutionMessage

func (w *WorkerRuntime) HandleExecutionMessage(ctx context.Context, msg *gocore.JobExecutionMessage) error

func (*WorkerRuntime) HasEnqueuer

func (w *WorkerRuntime) HasEnqueuer() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL