mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
Enable reconciliator on entitlements change
Signed-off-by: Danny Kopping <dannykopping@gmail.com>
This commit is contained in:
@ -3,24 +3,18 @@ package prebuilds
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/coder/coder/v2/coderd/database"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/coder/coder/v2/coderd/database"
|
||||
)
|
||||
|
||||
type Reconciler interface {
|
||||
RunLoop(ctx context.Context)
|
||||
Stop(ctx context.Context, cause error)
|
||||
ReconcileAll(ctx context.Context) error
|
||||
}
|
||||
|
||||
type Claimer interface {
|
||||
Claim(ctx context.Context, store database.Store, userID uuid.UUID, name string, presetID uuid.UUID) (*uuid.UUID, error)
|
||||
Initiator() uuid.UUID
|
||||
}
|
||||
|
||||
type AGPLPrebuildClaimer struct{}
|
||||
|
||||
func (c AGPLPrebuildClaimer) Claim(context.Context, database.Store, uuid.UUID, string, uuid.UUID) (*uuid.UUID, error) {
|
||||
// Not entitled to claim prebuilds in AGPL version.
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c AGPLPrebuildClaimer) Initiator() uuid.UUID {
|
||||
return uuid.Nil
|
||||
}
|
||||
|
||||
var DefaultClaimer Claimer = AGPLPrebuildClaimer{}
|
||||
|
Reference in New Issue
Block a user