Versions in this module Expand all Collapse all v1 v1.8.4 Jul 23, 2026 v1.8.3 Jul 22, 2026 v1.8.2 Jul 22, 2026 v1.8.1 Jul 21, 2026 v1.8.0 Jul 21, 2026 v1.7.14 Jul 20, 2026 v1.7.13 Jul 18, 2026 Changes in this version + const TenantDBNotReady + const TenantNotActive + const TenantNotFound + const TenantRequired + const TenantScopeForbidden + var EmbeddedApitoFunctionsSDK string + var GlobalInvocationRegistry = NewInvocationRegistry() + func RegisterReadDataOps(g *EngineDataGateway, deps GatewayDeps, registry *InvocationRegistry) + func ResolveActiveSource(ctx context.Context, store ArtifactStore, fn *models.ApitoFunction) string type DenoRuntimeProvider + Gateway FunctionDataGateway + Registry *InvocationRegistry + type GatewayBridge struct + InvocationID string + Token string + URL string + func StartGatewayBridge(ctx context.Context, gateway FunctionDataGateway, inv *InvocationContext) (*GatewayBridge, error) + func (b *GatewayBridge) Close() + type GatewayDeps interface + GetProjectDriver func(ctx context.Context, inv *InvocationContext) (interfaces.ProjectDBInterface, error) + NewParam func(inv *InvocationContext) *models.CommonSystemParams + ResolveModel func(inv *InvocationContext, modelArg string) (*models.ModelType, error) + type InvocationContext struct + Capabilities []string + DBCtx context.Context + Envelope *InvocationEnvelope + Gateway FunctionDataGateway + Param *models.CommonSystemParams + Project *models.Project + type InvocationRegistry struct + func NewInvocationRegistry() *InvocationRegistry + func (r *InvocationRegistry) Get(invocationID string) (*InvocationContext, error) + func (r *InvocationRegistry) Register(inv *InvocationContext) error + func (r *InvocationRegistry) Unregister(invocationID string) + type TenantScopeError struct + Code string + Message string + func AsTenantScopeError(err error) (*TenantScopeError, bool) + func NewTenantScopeError(code, message string) *TenantScopeError + func (e *TenantScopeError) Error() string v1.7.12 Jul 16, 2026 Changes in this version + const ABIVersion + const EventAccepted + const EventCommitted + const EventDeadLettered + const EventFailed + const EventRunning + func AllowCallableRuntime(fn *models.ApitoFunction) bool + func DataGatewaySubject(projectID string) string + func DeployDraft(ctx context.Context, store ArtifactStore, fn *models.ApitoFunction, ...) (*models.FunctionRevision, *models.FunctionDeployment, error) + func EventSubject(projectID, functionName string) string + func FindFunctionByName(project *models.Project, name string) *models.ApitoFunction + func InvokeSubject(projectID, functionName string) string + func RegisterCoreDataOps(g *EngineDataGateway, batch ProjectBatchExecutor) + func RequireCapability(caps []string) func(context.Context, *DataGatewayCall) error + func RollbackDeployment(fn *models.ApitoFunction, previousRevisionID, deployedBy string) *models.FunctionDeployment + func ValidateBatchOps(ops []BatchOp) error + func VerifyFunctionSecret(fn *models.ApitoFunction, provided string) error + type ArtifactStore interface + Delete func(ctx context.Context, key string) error + Get func(ctx context.Context, key string) ([]byte, string, error) + Put func(ctx context.Context, key string, data []byte, hash string) error + type BatchOp struct + By float64 + Connect map[string]interface{} + Disconnect map[string]interface{} + Field string + ID string + Model string + Op string + Payload map[string]interface{} + type BatchRequest struct + IdempotencyKey string + Operations []BatchOp + type BatchResult struct + Error string + IDs []string + OK bool + Replay bool + Result map[string]interface{} + func (r *BatchResult) StatusCommitted() bool + type DataGatewayCall struct + InvocationID string + Op string + Payload map[string]interface{} + ProjectID string + TenantID string + type DataGatewayResponse struct + Data map[string]interface{} + Error string + OK bool + type DataOpHandler func(ctx context.Context, call *DataGatewayCall) (*DataGatewayResponse, error) + type DefaultLimitsProvider struct + func (DefaultLimitsProvider) LimitsFor(ctx context.Context, projectID string, fn *models.ApitoFunction) (FunctionLimits, error) + type DenoRuntimeProvider struct + DenoPath string + WorkDir string + func (p *DenoRuntimeProvider) Execute(ctx context.Context, env *InvocationEnvelope, limits FunctionLimits) (*InvocationResult, error) + func (p *DenoRuntimeProvider) Name() string + type EngineDataGateway struct + CheckCapability func(ctx context.Context, call *DataGatewayCall) error + HostCallCount map[string]int + MaxHostCalls int + func NewEngineDataGateway() *EngineDataGateway + func (g *EngineDataGateway) Handle(ctx context.Context, call *DataGatewayCall) (*DataGatewayResponse, error) + func (g *EngineDataGateway) Register(op string, h DataOpHandler) + type EventDispatcher interface + Publish func(ctx context.Context, msg *EventMessage) error + Subscribe func(ctx context.Context, ...) (func() error, error) + type EventMessage struct + Attempt int + Function string + ID string + IdempotencyKey string + MaxDeliver int + Payload map[string]interface{} + ProjectID string + Trigger string + type FilesystemArtifactStore struct + func NewFilesystemArtifactStore(dir string) (*FilesystemArtifactStore, error) + func (s *FilesystemArtifactStore) Delete(ctx context.Context, key string) error + func (s *FilesystemArtifactStore) Get(ctx context.Context, key string) ([]byte, string, error) + func (s *FilesystemArtifactStore) Put(ctx context.Context, key string, data []byte, hash string) error + type FunctionDataGateway interface + Handle func(ctx context.Context, call *DataGatewayCall) (*DataGatewayResponse, error) + type FunctionInvoker interface + Invoke func(ctx context.Context, env *InvocationEnvelope) (*InvocationResult, error) + type FunctionLimits struct + MaxConcurrency int + MaxHostCalls int + MaxLogBytes int64 + MaxRequestBytes int64 + MaxResponseBytes int64 + MemoryBytes int64 + Timeout time.Duration + func DefaultCallableLimits() FunctionLimits + type FunctionLimitsProvider interface + LimitsFor func(ctx context.Context, projectID string, fn *models.ApitoFunction) (FunctionLimits, error) + type FunctionTransport interface + Close func() error + Request func(ctx context.Context, subject string, payload []byte, timeout time.Duration) ([]byte, error) + RespondHandler func(ctx context.Context, subject string, queueGroup string, ...) (func() error, error) + type HookLimitsProvider struct + Hook func(ctx context.Context, projectID string, fn *models.ApitoFunction) (memoryBytes int64, timeoutMs int64, maxConcurrency int, err error) + func (p HookLimitsProvider) LimitsFor(ctx context.Context, projectID string, fn *models.ApitoFunction) (FunctionLimits, error) + type InvocationEnvelope struct + ArtifactHash string + ArtifactKey string + Capabilities []string + DeadlineMs int64 + Function string + Handler string + Idempotency string + InvocationID string + Principal Principal + ProjectID string + Request map[string]interface{} + RevisionID string + Role string + Runtime string + Source string + TenantID string + UserID string + Version string + func BuildEnvelope(fn *models.ApitoFunction, projectID, tenantID, userID, role string, ...) *InvocationEnvelope + type InvocationResult struct + DurationMs int64 + Error string + ErrorClass string + HostCalls int + Logs []LogEntry + OK bool + Response map[string]interface{} + ResultDigest string + Version string + type LocalTransport struct + func NewLocalTransport() *LocalTransport + func (t *LocalTransport) Close() error + func (t *LocalTransport) Request(ctx context.Context, subject string, payload []byte, timeout time.Duration) ([]byte, error) + func (t *LocalTransport) RespondHandler(ctx context.Context, subject string, _ string, ...) (func() error, error) + type LogEntry struct + At string + Level string + Message string + type ManagerOption func(*RuntimeManager) + func WithArtifactStore(s ArtifactStore) ManagerOption + func WithDataGateway(g FunctionDataGateway) ManagerOption + func WithGlobalConcurrency(n int) ManagerOption + func WithLimitsProvider(p FunctionLimitsProvider) ManagerOption + func WithTransport(t FunctionTransport) ManagerOption + type MemoryBatchExecutor struct + Apply func(ctx context.Context, projectID, tenantScope string, op BatchOp) (string, error) + func NewMemoryBatchExecutor() *MemoryBatchExecutor + func (e *MemoryBatchExecutor) ExecuteBatch(ctx context.Context, projectID, tenantScope string, req *BatchRequest) (*BatchResult, error) + type MemoryEventDispatcher struct + func NewMemoryEventDispatcher() *MemoryEventDispatcher + func (d *MemoryEventDispatcher) DeadLetters() []*EventMessage + func (d *MemoryEventDispatcher) Publish(ctx context.Context, msg *EventMessage) error + func (d *MemoryEventDispatcher) Subscribe(ctx context.Context, ...) (func() error, error) + type NATSConn interface + Close func() + QueueSubscribe func(subject, queue string, ...) (func() error, error) + RequestWithContext func(ctx context.Context, subject string, data []byte) ([]byte, error) + type NATSFunctionTransport struct + func NewNATSFunctionTransport(conn NATSConn) *NATSFunctionTransport + func (t *NATSFunctionTransport) Close() error + func (t *NATSFunctionTransport) Request(ctx context.Context, subject string, payload []byte, timeout time.Duration) ([]byte, error) + func (t *NATSFunctionTransport) RespondHandler(ctx context.Context, subject string, queueGroup string, ...) (func() error, error) + type Principal struct + Mode string + Role string + UserID string + type ProjectBatchExecutor interface + ExecuteBatch func(ctx context.Context, projectID, tenantScope string, req *BatchRequest) (*BatchResult, error) + type RuntimeManager struct + func NewRuntimeManager(providers []RuntimeProvider, opts ...ManagerOption) *RuntimeManager + func (m *RuntimeManager) Artifacts() ArtifactStore + func (m *RuntimeManager) DataGateway() FunctionDataGateway + func (m *RuntimeManager) Invoke(ctx context.Context, env *InvocationEnvelope) (*InvocationResult, error) + func (m *RuntimeManager) RegisterProvider(p RuntimeProvider) + type RuntimeProvider interface + Execute func(ctx context.Context, env *InvocationEnvelope, limits FunctionLimits) (*InvocationResult, error) + Name func() string + type StubRuntimeProvider struct + RuntimeName string + func (p *StubRuntimeProvider) Execute(ctx context.Context, env *InvocationEnvelope, limits FunctionLimits) (*InvocationResult, error) + func (p *StubRuntimeProvider) Name() string + type WazeroRuntimeProvider struct + func NewWazeroRuntimeProvider(ctx context.Context) *WazeroRuntimeProvider + func (p *WazeroRuntimeProvider) Close(ctx context.Context) error + func (p *WazeroRuntimeProvider) Execute(ctx context.Context, env *InvocationEnvelope, limits FunctionLimits) (*InvocationResult, error) + func (p *WazeroRuntimeProvider) Name() string