Documentation ¶
Index ¶
- Constants
- func New(opts ...EngineOpt) (*engine, error)
- type BuildExecutableInterface
- type EngineOpt
- func WithClient(client *gorm.DB) EngineOpt
- func WithCompressionLevel(level int) EngineOpt
- func WithContext(ctx context.Context) EngineOpt
- func WithDriver(driver string) EngineOpt
- func WithEncryptionKey(key string) EngineOpt
- func WithLogger(logger *logrus.Entry) EngineOpt
- func WithSkipCreation(skipCreation bool) EngineOpt
Constants ¶
const ( // CreatePostgresTable represents a query to create the Postgres build_executables table. CreatePostgresTable = `` /* 159-byte string literal not displayed */ // CreateSqliteTable represents a query to create the Sqlite build_executables table. CreateSqliteTable = `` /* 173-byte string literal not displayed */ )
const CleanExecutablesPostgres = `
DELETE FROM build_executables
USING builds
WHERE builds.id = build_executables.build_id
AND builds.status = 'error';
`
const CleanExecutablesSqlite = `` /* 180-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildExecutableInterface ¶
type BuildExecutableInterface interface { // BuildExecutable Data Definition Language Functions // // https://en.wikipedia.org/wiki/Data_definition_language CreateBuildExecutableTable(context.Context, string) error // CleanBuildExecutables defines a function that deletes errored builds' corresponding executables. CleanBuildExecutables(context.Context) (int64, error) // CreateBuildExecutable defines a function that creates a build executable. CreateBuildExecutable(context.Context, *library.BuildExecutable) error // PopBuildExecutable defines a function that gets and deletes a build executable. PopBuildExecutable(context.Context, int64) (*library.BuildExecutable, error) }
BuildExecutableInterface represents the Vela interface for build executable functions with the supported Database backends.
type EngineOpt ¶
type EngineOpt func(*engine) error
EngineOpt represents a configuration option to initialize the database engine for build executables.
func WithClient ¶
WithClient sets the gorm.io/gorm client in the database engine for build executables.
func WithCompressionLevel ¶
WithCompressionLevel sets the compression level in the database engine for build executables.
func WithContext ¶
WithContext sets the context in the database engine for build executables.
func WithDriver ¶
WithDriver sets the driver type in the database engine for build executables.
func WithEncryptionKey ¶
WithEncryptionKey sets the encryption key in the database engine for build executables.
func WithLogger ¶
WithLogger sets the github.com/sirupsen/logrus logger in the database engine for build executables.
func WithSkipCreation ¶
WithSkipCreation sets the skip creation logic in the database engine for build executables.