Documentation
¶
Index ¶
- 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) 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 s3.ObjectStorage) *BundleWorker
- func (worker *BundleWorker) WithSynchronizers(synchronizers []Synchronizer) *BundleWorker
- 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) 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) WithSingleShot(singleShot bool) *Service
- type Status
- type Synchronizer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) 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 s3.ObjectStorage) *BundleWorker
func (*BundleWorker) WithSynchronizers ¶
func (worker *BundleWorker) WithSynchronizers(synchronizers []Synchronizer) *BundleWorker
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) WithMigrateDB ¶
func (*Service) WithNoninteractive ¶
func (*Service) WithPersistenceDir ¶
func (*Service) WithSingleShot ¶
type Status ¶
type Status struct {
State BuildState
Message string
}
Click to show internal directories.
Click to hide internal directories.