Documentation ¶
Index ¶
- type AcquireAsyncCallRow
- type AsyncCall
- type AsyncCallState
- type Controller
- type ControllerState
- type CreateAsyncCallParams
- type CreateCronJobParams
- type CreateIngressRouteParams
- type CronJob
- type DBTX
- type Deployment
- type FailAsyncCallWithRetryParams
- type GetActiveDeploymentSchemasRow
- type GetActiveDeploymentsRow
- type GetActiveIngressRoutesRow
- type GetActiveRunnersRow
- type GetCronJobByKeyRow
- type GetDeploymentRow
- type GetDeploymentsWithArtefactsRow
- type GetDeploymentsWithMinReplicasRow
- type GetExistingDeploymentForModuleRow
- type GetIngressRoutesRow
- type GetNextEventForSubscriptionRow
- type GetProcessListRow
- type GetRandomSubscriberRow
- type GetRunnerRow
- type GetRunnersForDeploymentRow
- type GetSubscriptionsNeedingUpdateRow
- type GetUnscheduledCronJobsRow
- type InsertSubscriberParams
- type InsertTimelineDeploymentCreatedEventParams
- type InsertTimelineDeploymentUpdatedEventParams
- type Module
- type NullAsyncCallState
- type NullControllerState
- type NullOrigin
- type NullTopicSubscriptionState
- type Origin
- type PublishEventForTopicParams
- type Querier
- type Queries
- func (q *Queries) AcquireAsyncCall(ctx context.Context, ttl sqltypes.Duration) (AcquireAsyncCallRow, error)
- func (q *Queries) AsyncCallQueueDepth(ctx context.Context) (int64, error)
- func (q *Queries) BeginConsumingTopicEvent(ctx context.Context, subscription model.SubscriptionKey, ...) error
- func (q *Queries) CompleteEventForSubscription(ctx context.Context, name string, module string) error
- func (q *Queries) CreateAsyncCall(ctx context.Context, arg CreateAsyncCallParams) (int64, error)
- func (q *Queries) CreateCronJob(ctx context.Context, arg CreateCronJobParams) error
- func (q *Queries) CreateDeployment(ctx context.Context, moduleName string, schema []byte, key model.DeploymentKey) error
- func (q *Queries) CreateIngressRoute(ctx context.Context, arg CreateIngressRouteParams) error
- func (q *Queries) CreateRequest(ctx context.Context, origin Origin, key model.RequestKey, sourceAddr string) error
- func (q *Queries) DeleteCronAsyncCallsForDeployment(ctx context.Context, deploymentKey model.DeploymentKey) error
- func (q *Queries) DeleteCronJobsForDeployment(ctx context.Context, deploymentKey model.DeploymentKey) error
- func (q *Queries) DeleteSubscribers(ctx context.Context, deployment model.DeploymentKey) ([]model.SubscriberKey, error)
- func (q *Queries) DeleteSubscriptions(ctx context.Context, deployment model.DeploymentKey) ([]model.SubscriptionKey, error)
- func (q *Queries) DeregisterRunner(ctx context.Context, key model.RunnerKey) (int64, error)
- func (q *Queries) FailAsyncCall(ctx context.Context, error string, iD int64) (bool, error)
- func (q *Queries) FailAsyncCallWithRetry(ctx context.Context, arg FailAsyncCallWithRetryParams) (bool, error)
- func (q *Queries) GetActiveControllers(ctx context.Context) ([]Controller, error)
- func (q *Queries) GetActiveDeploymentSchemas(ctx context.Context) ([]GetActiveDeploymentSchemasRow, error)
- func (q *Queries) GetActiveDeployments(ctx context.Context) ([]GetActiveDeploymentsRow, error)
- func (q *Queries) GetActiveIngressRoutes(ctx context.Context) ([]GetActiveIngressRoutesRow, error)
- func (q *Queries) GetActiveRunners(ctx context.Context) ([]GetActiveRunnersRow, error)
- func (q *Queries) GetCronJobByKey(ctx context.Context, key model.CronJobKey) (GetCronJobByKeyRow, error)
- func (q *Queries) GetDeployment(ctx context.Context, key model.DeploymentKey) (GetDeploymentRow, error)
- func (q *Queries) GetDeploymentsByID(ctx context.Context, ids []int64) ([]Deployment, error)
- func (q *Queries) GetDeploymentsWithArtefacts(ctx context.Context, digests [][]byte, schema []byte, count int64) ([]GetDeploymentsWithArtefactsRow, error)
- func (q *Queries) GetDeploymentsWithMinReplicas(ctx context.Context) ([]GetDeploymentsWithMinReplicasRow, error)
- func (q *Queries) GetExistingDeploymentForModule(ctx context.Context, name string) (GetExistingDeploymentForModuleRow, error)
- func (q *Queries) GetIngressRoutes(ctx context.Context) ([]GetIngressRoutesRow, error)
- func (q *Queries) GetModulesByID(ctx context.Context, ids []int64) ([]Module, error)
- func (q *Queries) GetNextEventForSubscription(ctx context.Context, consumptionDelay sqltypes.Duration, topic model.TopicKey, ...) (GetNextEventForSubscriptionRow, error)
- func (q *Queries) GetProcessList(ctx context.Context) ([]GetProcessListRow, error)
- func (q *Queries) GetRandomSubscriber(ctx context.Context, key model.SubscriptionKey) (GetRandomSubscriberRow, error)
- func (q *Queries) GetRunner(ctx context.Context, key model.RunnerKey) (GetRunnerRow, error)
- func (q *Queries) GetRunnersForDeployment(ctx context.Context, key model.DeploymentKey) ([]GetRunnersForDeploymentRow, error)
- func (q *Queries) GetSchemaForDeployment(ctx context.Context, key model.DeploymentKey) (*schema.Module, error)
- func (q *Queries) GetSubscription(ctx context.Context, column1 string, column2 string) (TopicSubscription, error)
- func (q *Queries) GetSubscriptionsNeedingUpdate(ctx context.Context) ([]GetSubscriptionsNeedingUpdateRow, error)
- func (q *Queries) GetTopic(ctx context.Context, dollar_1 int64) (Topic, error)
- func (q *Queries) GetTopicEvent(ctx context.Context, dollar_1 int64) (TopicEvent, error)
- func (q *Queries) GetUnscheduledCronJobs(ctx context.Context, startTime time.Time) ([]GetUnscheduledCronJobsRow, error)
- func (q *Queries) GetZombieAsyncCalls(ctx context.Context, limit int32) ([]AsyncCall, error)
- func (q *Queries) InsertSubscriber(ctx context.Context, arg InsertSubscriberParams) error
- func (q *Queries) InsertTimelineDeploymentCreatedEvent(ctx context.Context, arg InsertTimelineDeploymentCreatedEventParams) error
- func (q *Queries) InsertTimelineDeploymentUpdatedEvent(ctx context.Context, arg InsertTimelineDeploymentUpdatedEventParams) error
- func (q *Queries) IsCronJobPending(ctx context.Context, key model.CronJobKey, startTime time.Time) (bool, error)
- func (q *Queries) KillStaleControllers(ctx context.Context, timeout sqltypes.Duration) (int64, error)
- func (q *Queries) KillStaleRunners(ctx context.Context, timeout sqltypes.Duration) (int64, error)
- func (q *Queries) LoadAsyncCall(ctx context.Context, id int64) (AsyncCall, error)
- func (q *Queries) PublishEventForTopic(ctx context.Context, arg PublishEventForTopicParams) error
- func (q *Queries) SetDeploymentDesiredReplicas(ctx context.Context, key model.DeploymentKey, minReplicas int32) error
- func (q *Queries) SetSubscriptionCursor(ctx context.Context, column1 model.SubscriptionKey, ...) error
- func (q *Queries) SucceedAsyncCall(ctx context.Context, response api.OptionalEncryptedAsyncColumn, iD int64) (bool, error)
- func (q *Queries) UpdateCronJobExecution(ctx context.Context, arg UpdateCronJobExecutionParams) error
- func (q *Queries) UpsertController(ctx context.Context, key model.ControllerKey, endpoint string) (int64, error)
- func (q *Queries) UpsertModule(ctx context.Context, language string, name string) (int64, error)
- func (q *Queries) UpsertRunner(ctx context.Context, arg UpsertRunnerParams) (int64, error)
- func (q *Queries) UpsertSubscription(ctx context.Context, arg UpsertSubscriptionParams) (UpsertSubscriptionRow, error)
- func (q *Queries) UpsertTopic(ctx context.Context, arg UpsertTopicParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Topic
- type TopicEvent
- type TopicSubscription
- type TopicSubscriptionState
- type UpdateCronJobExecutionParams
- type UpsertRunnerParams
- type UpsertSubscriptionParams
- type UpsertSubscriptionRow
- type UpsertTopicParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AcquireAsyncCallRow ¶
type AcquireAsyncCallRow struct { AsyncCallID int64 LeaseIdempotencyKey uuid.UUID LeaseKey leases.Key QueueDepth int64 Origin string Verb schema.RefKey CatchVerb optional.Option[schema.RefKey] Request api.EncryptedAsyncColumn ScheduledAt time.Time RemainingAttempts int32 Error optional.Option[string] Backoff sqltypes.Duration MaxBackoff sqltypes.Duration ParentRequestKey optional.Option[string] TraceContext pqtype.NullRawMessage Catching bool }
type AsyncCall ¶
type AsyncCall struct { ID int64 CreatedAt time.Time LeaseID optional.Option[int64] Verb schema.RefKey State AsyncCallState Origin string ScheduledAt time.Time Request api.EncryptedAsyncColumn Response api.OptionalEncryptedAsyncColumn Error optional.Option[string] RemainingAttempts int32 Backoff sqltypes.Duration MaxBackoff sqltypes.Duration CatchVerb optional.Option[schema.RefKey] Catching bool ParentRequestKey optional.Option[string] TraceContext pqtype.NullRawMessage }
type AsyncCallState ¶
type AsyncCallState string
const ( AsyncCallStatePending AsyncCallState = "pending" AsyncCallStateExecuting AsyncCallState = "executing" AsyncCallStateSuccess AsyncCallState = "success" AsyncCallStateError AsyncCallState = "error" )
func (*AsyncCallState) Scan ¶
func (e *AsyncCallState) Scan(src interface{}) error
type Controller ¶
type Controller struct { ID int64 Key model.ControllerKey Created time.Time LastSeen time.Time State ControllerState Endpoint string }
type ControllerState ¶
type ControllerState string
const ( ControllerStateLive ControllerState = "live" ControllerStateDead ControllerState = "dead" )
func (*ControllerState) Scan ¶
func (e *ControllerState) Scan(src interface{}) error
type CreateAsyncCallParams ¶
type CreateAsyncCallParams struct { ScheduledAt time.Time Verb schema.RefKey Origin string Request api.EncryptedAsyncColumn RemainingAttempts int32 Backoff sqltypes.Duration MaxBackoff sqltypes.Duration CatchVerb optional.Option[schema.RefKey] ParentRequestKey optional.Option[string] TraceContext json.RawMessage }
type CreateCronJobParams ¶
type Deployment ¶
type GetActiveDeploymentSchemasRow ¶
type GetActiveDeploymentSchemasRow struct { Key model.DeploymentKey Schema *schema.Module }
type GetActiveDeploymentsRow ¶
type GetActiveDeploymentsRow struct { Deployment Deployment ModuleName string Language string Replicas int64 }
type GetActiveRunnersRow ¶
type GetCronJobByKeyRow ¶
type GetCronJobByKeyRow struct { CronJob CronJob Deployment Deployment }
type GetDeploymentRow ¶
type GetDeploymentRow struct { Deployment Deployment Language string ModuleName string MinReplicas int32 }
type GetDeploymentsWithMinReplicasRow ¶
type GetDeploymentsWithMinReplicasRow struct { Deployment Deployment ModuleName string Language string }
type GetIngressRoutesRow ¶
type GetNextEventForSubscriptionRow ¶
type GetNextEventForSubscriptionRow struct { Event optional.Option[model.TopicEventKey] Payload api.OptionalEncryptedAsyncColumn CreatedAt sqltypes.OptionalTime Caller optional.Option[string] RequestKey optional.Option[string] TraceContext pqtype.NullRawMessage Ready bool }
type GetProcessListRow ¶
type GetProcessListRow struct { MinReplicas int32 DeploymentKey model.DeploymentKey DeploymentLabels json.RawMessage RunnerKey optional.Option[model.RunnerKey] Endpoint optional.Option[string] RunnerLabels pqtype.NullRawMessage }
type GetRandomSubscriberRow ¶
type GetRunnerRow ¶
type GetRunnersForDeploymentRow ¶
type GetRunnersForDeploymentRow struct { ID int64 Key model.RunnerKey Created time.Time LastSeen time.Time Endpoint string ModuleName optional.Option[string] DeploymentID int64 Labels json.RawMessage ID_2 int64 CreatedAt time.Time ModuleID int64 Key_2 model.DeploymentKey Schema *schema.Module Labels_2 json.RawMessage MinReplicas int32 LastActivatedAt time.Time }
type GetSubscriptionsNeedingUpdateRow ¶
type GetSubscriptionsNeedingUpdateRow struct { Key model.SubscriptionKey Cursor optional.Option[model.TopicEventKey] Topic model.TopicKey Name string DeploymentKey model.DeploymentKey RequestKey optional.Option[string] }
type GetUnscheduledCronJobsRow ¶
type GetUnscheduledCronJobsRow struct { CronJob CronJob Deployment Deployment }
type InsertSubscriberParams ¶
type InsertTimelineDeploymentCreatedEventParams ¶
type InsertTimelineDeploymentCreatedEventParams struct { DeploymentKey model.DeploymentKey Language string ModuleName string Payload api.EncryptedTimelineColumn }
type InsertTimelineDeploymentUpdatedEventParams ¶
type InsertTimelineDeploymentUpdatedEventParams struct { DeploymentKey model.DeploymentKey Language string ModuleName string Payload api.EncryptedTimelineColumn }
type NullAsyncCallState ¶
type NullAsyncCallState struct { AsyncCallState AsyncCallState Valid bool // Valid is true if AsyncCallState is not NULL }
func (*NullAsyncCallState) Scan ¶
func (ns *NullAsyncCallState) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullControllerState ¶
type NullControllerState struct { ControllerState ControllerState Valid bool // Valid is true if ControllerState is not NULL }
func (*NullControllerState) Scan ¶
func (ns *NullControllerState) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullOrigin ¶
func (*NullOrigin) Scan ¶
func (ns *NullOrigin) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullTopicSubscriptionState ¶
type NullTopicSubscriptionState struct { TopicSubscriptionState TopicSubscriptionState Valid bool // Valid is true if TopicSubscriptionState is not NULL }
func (*NullTopicSubscriptionState) Scan ¶
func (ns *NullTopicSubscriptionState) Scan(value interface{}) error
Scan implements the Scanner interface.
type PublishEventForTopicParams ¶
type PublishEventForTopicParams struct { Key model.TopicEventKey Module string Topic string Caller string Payload api.EncryptedAsyncColumn RequestKey string TraceContext json.RawMessage }
type Querier ¶
type Querier interface { // Reserve a pending async call for execution, returning the associated lease // reservation key and accompanying metadata. AcquireAsyncCall(ctx context.Context, ttl sqltypes.Duration) (AcquireAsyncCallRow, error) AsyncCallQueueDepth(ctx context.Context) (int64, error) BeginConsumingTopicEvent(ctx context.Context, subscription model.SubscriptionKey, event model.TopicEventKey) error CompleteEventForSubscription(ctx context.Context, name string, module string) error CreateAsyncCall(ctx context.Context, arg CreateAsyncCallParams) (int64, error) CreateCronJob(ctx context.Context, arg CreateCronJobParams) error CreateDeployment(ctx context.Context, moduleName string, schema []byte, key model.DeploymentKey) error CreateIngressRoute(ctx context.Context, arg CreateIngressRouteParams) error CreateRequest(ctx context.Context, origin Origin, key model.RequestKey, sourceAddr string) error DeleteCronAsyncCallsForDeployment(ctx context.Context, deploymentKey model.DeploymentKey) error DeleteCronJobsForDeployment(ctx context.Context, deploymentKey model.DeploymentKey) error DeleteSubscribers(ctx context.Context, deployment model.DeploymentKey) ([]model.SubscriberKey, error) DeleteSubscriptions(ctx context.Context, deployment model.DeploymentKey) ([]model.SubscriptionKey, error) DeregisterRunner(ctx context.Context, key model.RunnerKey) (int64, error) FailAsyncCall(ctx context.Context, error string, iD int64) (bool, error) FailAsyncCallWithRetry(ctx context.Context, arg FailAsyncCallWithRetryParams) (bool, error) GetActiveControllers(ctx context.Context) ([]Controller, error) GetActiveDeploymentSchemas(ctx context.Context) ([]GetActiveDeploymentSchemasRow, error) GetActiveDeployments(ctx context.Context) ([]GetActiveDeploymentsRow, error) GetActiveIngressRoutes(ctx context.Context) ([]GetActiveIngressRoutesRow, error) GetActiveRunners(ctx context.Context) ([]GetActiveRunnersRow, error) GetCronJobByKey(ctx context.Context, key model.CronJobKey) (GetCronJobByKeyRow, error) GetDeployment(ctx context.Context, key model.DeploymentKey) (GetDeploymentRow, error) GetDeploymentsByID(ctx context.Context, ids []int64) ([]Deployment, error) // Get all deployments that have artefacts matching the given digests. GetDeploymentsWithArtefacts(ctx context.Context, digests [][]byte, schema []byte, count int64) ([]GetDeploymentsWithArtefactsRow, error) GetDeploymentsWithMinReplicas(ctx context.Context) ([]GetDeploymentsWithMinReplicasRow, error) GetExistingDeploymentForModule(ctx context.Context, name string) (GetExistingDeploymentForModuleRow, error) // Get the runner endpoints corresponding to the given ingress route. GetIngressRoutes(ctx context.Context) ([]GetIngressRoutesRow, error) GetModulesByID(ctx context.Context, ids []int64) ([]Module, error) GetNextEventForSubscription(ctx context.Context, consumptionDelay sqltypes.Duration, topic model.TopicKey, cursor optional.Option[model.TopicEventKey]) (GetNextEventForSubscriptionRow, error) GetProcessList(ctx context.Context) ([]GetProcessListRow, error) GetRandomSubscriber(ctx context.Context, key model.SubscriptionKey) (GetRandomSubscriberRow, error) GetRunner(ctx context.Context, key model.RunnerKey) (GetRunnerRow, error) GetRunnersForDeployment(ctx context.Context, key model.DeploymentKey) ([]GetRunnersForDeploymentRow, error) GetSchemaForDeployment(ctx context.Context, key model.DeploymentKey) (*schema.Module, error) GetSubscription(ctx context.Context, column1 string, column2 string) (TopicSubscription, error) // Results may not be ready to be scheduled yet due to event consumption delay // Sorting ensures that brand new events (that may not be ready for consumption) // don't prevent older events from being consumed // We also make sure that the subscription belongs to a deployment that has at least one runner GetSubscriptionsNeedingUpdate(ctx context.Context) ([]GetSubscriptionsNeedingUpdateRow, error) GetTopic(ctx context.Context, dollar_1 int64) (Topic, error) GetTopicEvent(ctx context.Context, dollar_1 int64) (TopicEvent, error) GetUnscheduledCronJobs(ctx context.Context, startTime time.Time) ([]GetUnscheduledCronJobsRow, error) GetZombieAsyncCalls(ctx context.Context, limit int32) ([]AsyncCall, error) InsertSubscriber(ctx context.Context, arg InsertSubscriberParams) error InsertTimelineDeploymentCreatedEvent(ctx context.Context, arg InsertTimelineDeploymentCreatedEventParams) error InsertTimelineDeploymentUpdatedEvent(ctx context.Context, arg InsertTimelineDeploymentUpdatedEventParams) error IsCronJobPending(ctx context.Context, key model.CronJobKey, startTime time.Time) (bool, error) // Mark any controller entries that haven't been updated recently as dead. KillStaleControllers(ctx context.Context, timeout sqltypes.Duration) (int64, error) KillStaleRunners(ctx context.Context, timeout sqltypes.Duration) (int64, error) LoadAsyncCall(ctx context.Context, id int64) (AsyncCall, error) PublishEventForTopic(ctx context.Context, arg PublishEventForTopicParams) error SetDeploymentDesiredReplicas(ctx context.Context, key model.DeploymentKey, minReplicas int32) error SetSubscriptionCursor(ctx context.Context, column1 model.SubscriptionKey, column2 model.TopicEventKey) error SucceedAsyncCall(ctx context.Context, response api.OptionalEncryptedAsyncColumn, iD int64) (bool, error) UpdateCronJobExecution(ctx context.Context, arg UpdateCronJobExecutionParams) error UpsertController(ctx context.Context, key model.ControllerKey, endpoint string) (int64, error) UpsertModule(ctx context.Context, language string, name string) (int64, error) // Upsert a runner and return the deployment ID that it is assigned to, if any. UpsertRunner(ctx context.Context, arg UpsertRunnerParams) (int64, error) UpsertSubscription(ctx context.Context, arg UpsertSubscriptionParams) (UpsertSubscriptionRow, error) UpsertTopic(ctx context.Context, arg UpsertTopicParams) error }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AcquireAsyncCall ¶
func (q *Queries) AcquireAsyncCall(ctx context.Context, ttl sqltypes.Duration) (AcquireAsyncCallRow, error)
Reserve a pending async call for execution, returning the associated lease reservation key and accompanying metadata.
func (*Queries) AsyncCallQueueDepth ¶
func (*Queries) BeginConsumingTopicEvent ¶
func (q *Queries) BeginConsumingTopicEvent(ctx context.Context, subscription model.SubscriptionKey, event model.TopicEventKey) error
func (*Queries) CompleteEventForSubscription ¶
func (*Queries) CreateAsyncCall ¶
func (*Queries) CreateCronJob ¶
func (q *Queries) CreateCronJob(ctx context.Context, arg CreateCronJobParams) error
func (*Queries) CreateDeployment ¶
func (*Queries) CreateIngressRoute ¶
func (q *Queries) CreateIngressRoute(ctx context.Context, arg CreateIngressRouteParams) error
func (*Queries) CreateRequest ¶
func (*Queries) DeleteCronAsyncCallsForDeployment ¶ added in v0.384.0
func (*Queries) DeleteCronJobsForDeployment ¶ added in v0.383.1
func (*Queries) DeleteSubscribers ¶
func (q *Queries) DeleteSubscribers(ctx context.Context, deployment model.DeploymentKey) ([]model.SubscriberKey, error)
func (*Queries) DeleteSubscriptions ¶
func (q *Queries) DeleteSubscriptions(ctx context.Context, deployment model.DeploymentKey) ([]model.SubscriptionKey, error)
func (*Queries) DeregisterRunner ¶
func (*Queries) FailAsyncCall ¶
func (*Queries) FailAsyncCallWithRetry ¶
func (*Queries) GetActiveControllers ¶
func (q *Queries) GetActiveControllers(ctx context.Context) ([]Controller, error)
func (*Queries) GetActiveDeploymentSchemas ¶
func (q *Queries) GetActiveDeploymentSchemas(ctx context.Context) ([]GetActiveDeploymentSchemasRow, error)
func (*Queries) GetActiveDeployments ¶
func (q *Queries) GetActiveDeployments(ctx context.Context) ([]GetActiveDeploymentsRow, error)
func (*Queries) GetActiveIngressRoutes ¶
func (q *Queries) GetActiveIngressRoutes(ctx context.Context) ([]GetActiveIngressRoutesRow, error)
func (*Queries) GetActiveRunners ¶
func (q *Queries) GetActiveRunners(ctx context.Context) ([]GetActiveRunnersRow, error)
func (*Queries) GetCronJobByKey ¶
func (q *Queries) GetCronJobByKey(ctx context.Context, key model.CronJobKey) (GetCronJobByKeyRow, error)
func (*Queries) GetDeployment ¶
func (q *Queries) GetDeployment(ctx context.Context, key model.DeploymentKey) (GetDeploymentRow, error)
func (*Queries) GetDeploymentsByID ¶
func (*Queries) GetDeploymentsWithArtefacts ¶
func (q *Queries) GetDeploymentsWithArtefacts(ctx context.Context, digests [][]byte, schema []byte, count int64) ([]GetDeploymentsWithArtefactsRow, error)
Get all deployments that have artefacts matching the given digests.
func (*Queries) GetDeploymentsWithMinReplicas ¶
func (q *Queries) GetDeploymentsWithMinReplicas(ctx context.Context) ([]GetDeploymentsWithMinReplicasRow, error)
func (*Queries) GetExistingDeploymentForModule ¶
func (*Queries) GetIngressRoutes ¶
func (q *Queries) GetIngressRoutes(ctx context.Context) ([]GetIngressRoutesRow, error)
Get the runner endpoints corresponding to the given ingress route.
func (*Queries) GetModulesByID ¶
func (*Queries) GetNextEventForSubscription ¶
func (*Queries) GetProcessList ¶
func (q *Queries) GetProcessList(ctx context.Context) ([]GetProcessListRow, error)
func (*Queries) GetRandomSubscriber ¶
func (q *Queries) GetRandomSubscriber(ctx context.Context, key model.SubscriptionKey) (GetRandomSubscriberRow, error)
func (*Queries) GetRunnersForDeployment ¶
func (q *Queries) GetRunnersForDeployment(ctx context.Context, key model.DeploymentKey) ([]GetRunnersForDeploymentRow, error)
func (*Queries) GetSchemaForDeployment ¶
func (*Queries) GetSubscription ¶
func (*Queries) GetSubscriptionsNeedingUpdate ¶
func (q *Queries) GetSubscriptionsNeedingUpdate(ctx context.Context) ([]GetSubscriptionsNeedingUpdateRow, error)
Results may not be ready to be scheduled yet due to event consumption delay Sorting ensures that brand new events (that may not be ready for consumption) don't prevent older events from being consumed We also make sure that the subscription belongs to a deployment that has at least one runner
func (*Queries) GetTopicEvent ¶
func (*Queries) GetUnscheduledCronJobs ¶
func (*Queries) GetZombieAsyncCalls ¶
func (*Queries) InsertSubscriber ¶
func (q *Queries) InsertSubscriber(ctx context.Context, arg InsertSubscriberParams) error
func (*Queries) InsertTimelineDeploymentCreatedEvent ¶
func (q *Queries) InsertTimelineDeploymentCreatedEvent(ctx context.Context, arg InsertTimelineDeploymentCreatedEventParams) error
func (*Queries) InsertTimelineDeploymentUpdatedEvent ¶
func (q *Queries) InsertTimelineDeploymentUpdatedEvent(ctx context.Context, arg InsertTimelineDeploymentUpdatedEventParams) error
func (*Queries) IsCronJobPending ¶
func (*Queries) KillStaleControllers ¶
func (q *Queries) KillStaleControllers(ctx context.Context, timeout sqltypes.Duration) (int64, error)
Mark any controller entries that haven't been updated recently as dead.
func (*Queries) KillStaleRunners ¶
func (*Queries) LoadAsyncCall ¶
func (*Queries) PublishEventForTopic ¶
func (q *Queries) PublishEventForTopic(ctx context.Context, arg PublishEventForTopicParams) error
func (*Queries) SetDeploymentDesiredReplicas ¶
func (*Queries) SetSubscriptionCursor ¶
func (q *Queries) SetSubscriptionCursor(ctx context.Context, column1 model.SubscriptionKey, column2 model.TopicEventKey) error
func (*Queries) SucceedAsyncCall ¶
func (*Queries) UpdateCronJobExecution ¶
func (q *Queries) UpdateCronJobExecution(ctx context.Context, arg UpdateCronJobExecutionParams) error
func (*Queries) UpsertController ¶
func (*Queries) UpsertModule ¶
func (*Queries) UpsertRunner ¶
Upsert a runner and return the deployment ID that it is assigned to, if any.
func (*Queries) UpsertSubscription ¶
func (q *Queries) UpsertSubscription(ctx context.Context, arg UpsertSubscriptionParams) (UpsertSubscriptionRow, error)
func (*Queries) UpsertTopic ¶
func (q *Queries) UpsertTopic(ctx context.Context, arg UpsertTopicParams) error
type TopicEvent ¶
type TopicSubscription ¶
type TopicSubscriptionState ¶
type TopicSubscriptionState string
const ( TopicSubscriptionStateIdle TopicSubscriptionState = "idle" TopicSubscriptionStateExecuting TopicSubscriptionState = "executing" )
func (*TopicSubscriptionState) Scan ¶
func (e *TopicSubscriptionState) Scan(src interface{}) error
type UpsertRunnerParams ¶
type UpsertRunnerParams struct { Key model.RunnerKey Endpoint string Labels json.RawMessage DeploymentKey model.DeploymentKey }
type UpsertSubscriptionParams ¶
type UpsertSubscriptionParams struct { Key model.SubscriptionKey TopicModule string TopicName string Module string Deployment model.DeploymentKey Name string }