Documentation
¶
Overview ¶
Package integrations orchestrates provider-neutral CI/CD integrations.
Index ¶
- Constants
- func IsRetryable(err error) bool
- type AlwaysLeader
- type CreateInput
- type Job
- type Leadership
- type Scheduler
- type SchedulerConfig
- type Service
- func (service *Service) Archive(ctx context.Context, tenantID, integrationID shared.ID, version int, ...) error
- func (service *Service) CancelOperation(ctx context.Context, tenantID, operationID shared.ID, actor string) (integration.Operation, error)
- func (service *Service) Create(ctx context.Context, input CreateInput) (integration.Integration, error)
- func (service *Service) CreateBinding(ctx context.Context, tenantID, integrationID, projectID shared.ID, ...) (integration.Binding, error)
- func (service *Service) DeleteBinding(ctx context.Context, tenantID, integrationID, bindingID shared.ID, ...) error
- func (service *Service) DeleteCredential(ctx context.Context, tenantID, integrationID shared.ID, ...) error
- func (service *Service) Get(ctx context.Context, tenantID, id shared.ID) (integration.Integration, error)
- func (service *Service) GetOperation(ctx context.Context, tenantID, operationID shared.ID) (integration.Operation, error)
- func (service *Service) HandleJob(ctx context.Context, jobID string, payload []byte) (err error)
- func (service *Service) List(ctx context.Context, tenantID shared.ID, includeArchived bool) ([]integration.Integration, error)
- func (service *Service) ListBindings(ctx context.Context, tenantID, integrationID shared.ID) ([]integration.Binding, error)
- func (service *Service) ListExternalRuns(ctx context.Context, tenantID, integrationID shared.ID, limit int) ([]integration.ExternalRun, error)
- func (service *Service) ListOperations(ctx context.Context, tenantID, integrationID shared.ID, limit int) ([]integration.Operation, error)
- func (service *Service) OnDeadLetter(ctx context.Context, payload []byte) error
- func (service *Service) ProviderDescriptors() []integration.ProviderDescriptor
- func (service *Service) SetCredential(ctx context.Context, tenantID, integrationID shared.ID, ...) error
- func (service *Service) SetEnabled(ctx context.Context, tenantID, integrationID shared.ID, enabled bool, ...) (integration.Integration, error)
- func (service *Service) SetObserver(observer ports.IntegrationObserver)
- func (service *Service) SetPrivateNetworkAllowed(allowed bool)
- func (service *Service) SetRunLock(runLock ports.RunLocker)
- func (service *Service) StartOperation(ctx context.Context, tenantID, integrationID shared.ID, ...) (integration.Operation, error)
- func (service *Service) Update(ctx context.Context, tenantID, id shared.ID, input UpdateInput) (integration.Integration, error)
- type UpdateInput
Constants ¶
View Source
const (
JobKind = "integration.operation"
)
Variables ¶
This section is empty.
Functions ¶
func IsRetryable ¶
Types ¶
type AlwaysLeader ¶
type AlwaysLeader struct{}
func (AlwaysLeader) IsLeader ¶
func (AlwaysLeader) IsLeader() bool
type CreateInput ¶
type Leadership ¶
type Leadership interface {
IsLeader() bool
}
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func NewScheduler(store ports.IntegrationStore, tenants ports.TenantLister, queue ports.JobQueue, service *Service, clock ports.Clock, leadership Leadership, config SchedulerConfig, log *slog.Logger) (*Scheduler, error)
type SchedulerConfig ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(store ports.IntegrationStore, registry *integration.Registry, projects ports.ProjectRepository, matcher ports.IntegrationAnalysisMatcher, ids ports.IDGenerator, clock ports.Clock) (*Service, error)
func (*Service) CancelOperation ¶
func (*Service) Create ¶
func (service *Service) Create(ctx context.Context, input CreateInput) (integration.Integration, error)
func (*Service) CreateBinding ¶
func (*Service) DeleteBinding ¶
func (*Service) DeleteCredential ¶
func (*Service) Get ¶
func (service *Service) Get(ctx context.Context, tenantID, id shared.ID) (integration.Integration, error)
func (*Service) GetOperation ¶
func (*Service) List ¶
func (service *Service) List(ctx context.Context, tenantID shared.ID, includeArchived bool) ([]integration.Integration, error)
func (*Service) ListBindings ¶
func (*Service) ListExternalRuns ¶
func (service *Service) ListExternalRuns(ctx context.Context, tenantID, integrationID shared.ID, limit int) ([]integration.ExternalRun, error)
func (*Service) ListOperations ¶
func (*Service) OnDeadLetter ¶
func (*Service) ProviderDescriptors ¶
func (service *Service) ProviderDescriptors() []integration.ProviderDescriptor
func (*Service) SetCredential ¶
func (*Service) SetEnabled ¶
func (*Service) SetObserver ¶
func (service *Service) SetObserver(observer ports.IntegrationObserver)
func (*Service) SetPrivateNetworkAllowed ¶
func (*Service) SetRunLock ¶
func (*Service) StartOperation ¶
func (service *Service) StartOperation(ctx context.Context, tenantID, integrationID shared.ID, operationType integration.OperationType, actor string) (integration.Operation, error)
func (*Service) Update ¶
func (service *Service) Update(ctx context.Context, tenantID, id shared.ID, input UpdateInput) (integration.Integration, error)
Click to show internal directories.
Click to hide internal directories.