Documentation
¶
Index ¶
- type Reconciler
- func (r *Reconciler) All(ctx context.Context, in ReconcilerAllInput) error
- func (r *Reconciler) ListSubscriptions(ctx context.Context, in ReconcilerListSubscriptionsInput) ([]SubscriptionWithSyncState, error)
- func (r *Reconciler) ReconcileSubscription(ctx context.Context, subsID models.NamespacedID) error
- type ReconcilerAllInput
- type ReconcilerConfig
- type ReconcilerListSubscriptionsInput
- type SubscriptionWithSyncState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reconciler ¶
type Reconciler struct {
// contains filtered or unexported fields
}
Reconciler is a component that periodically reconciles the subscription state with the billing state this is essential, as the invoice creation is purley event driven. In case a processing error happens, we might fail to create an invoice, and stop processing the subscription.
func NewReconciler ¶
func NewReconciler(config ReconcilerConfig) (*Reconciler, error)
func (*Reconciler) All ¶
func (r *Reconciler) All(ctx context.Context, in ReconcilerAllInput) error
func (*Reconciler) ListSubscriptions ¶
func (r *Reconciler) ListSubscriptions(ctx context.Context, in ReconcilerListSubscriptionsInput) ([]SubscriptionWithSyncState, error)
func (*Reconciler) ReconcileSubscription ¶
func (r *Reconciler) ReconcileSubscription(ctx context.Context, subsID models.NamespacedID) error
type ReconcilerAllInput ¶
type ReconcilerAllInput struct {
ReconcilerListSubscriptionsInput
Force bool
}
type ReconcilerConfig ¶
type ReconcilerConfig struct {
SubscriptionSync subscriptionsync.Service
SubscriptionService subscription.Service
CustomerService customer.Service
Logger *slog.Logger
}
func (ReconcilerConfig) Validate ¶
func (c ReconcilerConfig) Validate() error
type ReconcilerListSubscriptionsInput ¶
type ReconcilerListSubscriptionsInput struct {
Namespaces []string
Customers []string
Lookback time.Duration
}
func (ReconcilerListSubscriptionsInput) Validate ¶
func (i ReconcilerListSubscriptionsInput) Validate() error
type SubscriptionWithSyncState ¶
type SubscriptionWithSyncState struct {
subscription.Subscription
*subscriptionsync.SyncState
}
Click to show internal directories.
Click to hide internal directories.