Files
threshold/internal/server/controller.go
T
Ryan Derr 4cc5c07214 Migrate Controller Repo Usage From Store To Server (#5609)
* Create Server Domain Package For Controller

* Resolve Comments
2025-03-18 12:30:38 -05:00

30 lines
878 B
Go

// 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
}