You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/internal/server/controller.go

30 lines
878 B

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