forked from wrenn/wrenn
Refactored to maintain a separate cloud version
Moves 12 packages from internal/ to pkg/ (config, id, validate, events, db, auth, lifecycle, scheduler, channels, audit, service) so they can be imported by the enterprise repo as a Go module dependency. Introduces pkg/cpextension (shared Extension interface + ServerContext) and pkg/cpserver (Run() entrypoint with functional options) so the enterprise main.go can call cpserver.Run(cpserver.WithExtensions(...)) without duplicating the 20-step server bootstrap. Adds db/migrations/embed.go for go:embed access to OSS SQL migrations from the enterprise module. cmd/control-plane/main.go is reduced to a 10-line wrapper around cpserver.Run.
This commit is contained in:
@ -50,7 +50,7 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
Version = "0.5.4"
|
||||
Version = "0.1.0"
|
||||
|
||||
commitSHA string
|
||||
|
||||
@ -197,7 +197,7 @@ func main() {
|
||||
portSubsystem.Start(ctx)
|
||||
defer portSubsystem.Stop()
|
||||
|
||||
service := api.New(&envLogger, defaults, mmdsChan, isNotFC, ctx, portSubsystem)
|
||||
service := api.New(&envLogger, defaults, mmdsChan, isNotFC, ctx, portSubsystem, Version)
|
||||
handler := api.HandlerFromMux(service, m)
|
||||
middleware := authn.NewMiddleware(permissions.AuthenticateUsername)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user