Migrate Controller Repo Usage From Store To Server (#5609)
* Create Server Domain Package For Controller * Resolve Comments
This commit is contained in:
1 parent
f43f6e2788
commit
4cc5c07214
10 files changed
+119
-187
No files matched your search
@@ -0,0 +1,29 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
package server
|
||||
|
||||
import "github.com/hashicorp/boundary/internal/server/store"
|
||||
|
||||
// Controller is a server that is responsible for understanding configuration,
|
||||
// authenticating and authorizing users, and serving user API requests (e.g. to
|
||||
// initiate a session). They also assign tasks to workers (session handling,
|
||||
// session recording parsing, etc.).
|
||||
type Controller struct {
|
||||
*store.Controller
|
||||
}
|
||||
|
||||
// NewController returns a new controller. Valid options are WithAddress and WithDescription.
|
||||
// All other options are ignored.
|
||||
func NewController(privateId string, opt ...Option) *Controller {
|
||||
opts := GetOpts(opt...)
|
||||
controller := &Controller{
|
||||
Controller: &store.Controller{
|
||||
PrivateId: privateId,
|
||||
Address: opts.withAddress,
|
||||
Description: opts.withDescription,
|
||||
},
|
||||
}
|
||||
|
||||
return controller
|
||||
}
|
||||
Reference in new issue
Block a user