Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame contribute delete
857 Bytes
package processinglock
import (
"context"
"database/sql"
"github.com/jackc/pgx/v5"
"github.com/riverqueue/river"
"github.com/target/goalert/event"
)
// Module is a processing lock module.
type Module interface {
Name() string
}
// Updatable is an interface for types that can be updated.
type Updatable interface {
Module
UpdateAll(context.Context) error
}
// SetupArgs is a struct that contains the arguments for the setup function.
type SetupArgs struct {
DB *sql.DB
Workers *river.Workers
EventBus *event.Bus
River *river.Client[pgx.Tx]
}
// Setupable is an interface for types that can be set up using the job queue system.
type Setupable interface {
Module
// Setup is called to configure the processing lock system. Any workers, queues, and periodic jobs should be added here.
Setup(context.Context, SetupArgs) error
}