Documentation
¶
Index ¶
- type BuildPhase
- type BuildState
- type BundleWorker
- func (worker *BundleWorker) Done() bool
- func (w *BundleWorker) Execute(ctx context.Context) time.Time
- func (worker *BundleWorker) UpdateConfig(b *config.Bundle, sources []*config.Source, stacks []*config.Stack)
- func (worker *BundleWorker) WithDatabase(database *database.Database) *BundleWorker
- func (worker *BundleWorker) WithInterval(d config.Duration) *BundleWorker
- func (worker *BundleWorker) WithSingleShot(singleShot bool) *BundleWorker
- func (worker *BundleWorker) WithSources(sources []*builder.Source) *BundleWorker
- func (worker *BundleWorker) WithStorage(storage ext_os.ObjectStorage) *BundleWorker
- func (worker *BundleWorker) WithSynchronizers(synchronizers []sourceSynchronizer) *BundleWorker
- func (worker *BundleWorker) WithTenant(tenant string) *BundleWorker
- type ReferencedSource
- type Report
- type Service
- func (s *Service) Database() *database.Database
- func (s *Service) Init(ctx context.Context) error
- func (s *Service) Ready(context.Context) error
- func (s *Service) Report() *Report
- func (s *Service) Run(ctx context.Context) error
- func (s *Service) WithAuthorizer(a ext_authz.Authorizer) *Service
- func (s *Service) WithBuiltinFS(fs fs.FS) *Service
- func (s *Service) WithConfig(config *config.Root) *Service
- func (s *Service) WithLogger(logger *logging.Logger) *Service
- func (s *Service) WithMigrateDB(yes bool) *Service
- func (s *Service) WithNoninteractive(yes bool) *Service
- func (s *Service) WithPersistenceDir(d string) *Service
- func (s *Service) WithRawConfig(rawConfig []byte) *Service
- func (s *Service) WithSecretProviderFactory(factory pkgsync.SecretProviderFactory) *Service
- func (s *Service) WithSingleShot(singleShot bool) *Service
- func (s *Service) WithSlogLogger(logger *slog.Logger) *Service
- func (s *Service) WithStorage(storage ext_os.ObjectStorage) *Service
- type Status
- type Synchronizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildPhase ¶
type BuildPhase int
const ( BuildPhaseBuild BuildPhase = iota BuildPhasePush )
func (BuildPhase) String ¶
func (s BuildPhase) String() string
type BuildState ¶
type BuildState int
const ( BuildStateInternalError BuildState = iota BuildStateConfigError BuildStateSuccess BuildStateSyncFailed BuildStateTransformFailed BuildStateBuildFailed BuildStatePushFailed )
func (BuildState) String ¶
func (s BuildState) String() string
type BundleWorker ¶
type BundleWorker struct {
// contains filtered or unexported fields
}
BundleWorker is responsible for constructing a bundle from the source dependencies and uploading it to an object storage service. It uses a git synchronizer to pull the latest changes from the source repositories, constructs a bundle using the builder package, and uploads the resulting bundle to an S3-compatible object storage service.
func NewBundleWorker ¶
func (*BundleWorker) Done ¶
func (worker *BundleWorker) Done() bool
func (*BundleWorker) Execute ¶
func (w *BundleWorker) Execute(ctx context.Context) time.Time
Execute runs a bundle synchronization iteration: git sync, bundle construct and then push bundles to object storage.
func (*BundleWorker) UpdateConfig ¶
func (*BundleWorker) WithDatabase ¶
func (worker *BundleWorker) WithDatabase(database *database.Database) *BundleWorker
func (*BundleWorker) WithInterval ¶
func (worker *BundleWorker) WithInterval(d config.Duration) *BundleWorker
func (*BundleWorker) WithSingleShot ¶
func (worker *BundleWorker) WithSingleShot(singleShot bool) *BundleWorker
func (*BundleWorker) WithSources ¶
func (worker *BundleWorker) WithSources(sources []*builder.Source) *BundleWorker
func (*BundleWorker) WithStorage ¶
func (worker *BundleWorker) WithStorage(storage ext_os.ObjectStorage) *BundleWorker
func (*BundleWorker) WithSynchronizers ¶
func (worker *BundleWorker) WithSynchronizers(synchronizers []sourceSynchronizer) *BundleWorker
func (*BundleWorker) WithTenant ¶
func (worker *BundleWorker) WithTenant(tenant string) *BundleWorker
type ReferencedSource ¶
ReferencedSource represents a source that is referenced in the revision expression
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) WithAuthorizer ¶
func (s *Service) WithAuthorizer(a ext_authz.Authorizer) *Service
func (*Service) WithMigrateDB ¶
func (*Service) WithNoninteractive ¶
func (*Service) WithPersistenceDir ¶
func (*Service) WithRawConfig ¶
func (*Service) WithSecretProviderFactory ¶
func (s *Service) WithSecretProviderFactory(factory pkgsync.SecretProviderFactory) *Service
func (*Service) WithSingleShot ¶
func (*Service) WithSlogLogger ¶
WithSlogLogger sets the service logger from a standard *slog.Logger.
func (*Service) WithStorage ¶
func (s *Service) WithStorage(storage ext_os.ObjectStorage) *Service
type Status ¶
type Status struct {
State BuildState
Message string
}
Click to show internal directories.
Click to hide internal directories.