1
0
forked from wrenn/wrenn
This commit is contained in:
2026-04-16 19:24:25 +00:00
parent 172413e91e
commit 605ad666a0
239 changed files with 19966 additions and 3454 deletions

27
pkg/cpserver/options.go Normal file
View File

@ -0,0 +1,27 @@
package cpserver
// options holds the configuration for Run.
type options struct {
version string
commit string
extensions []Extension
}
// Option configures the control plane server.
type Option func(*options)
// WithVersion sets the version and commit strings for logging.
func WithVersion(version, commit string) Option {
return func(o *options) {
o.version = version
o.commit = commit
}
}
// WithExtensions registers one or more extensions that add routes and
// background workers to the control plane.
func WithExtensions(exts ...Extension) Option {
return func(o *options) {
o.extensions = append(o.extensions, exts...)
}
}