Documentation
¶
Index ¶
- Variables
- func AddFullLicense(t *testing.T, client *codersdk.Client) codersdk.License
- func AddLicense(t *testing.T, client *codersdk.Client, options LicenseOptions) codersdk.License
- func GenerateLicense(t *testing.T, options LicenseOptions) string
- func New(t *testing.T, options *Options) (*codersdk.Client, codersdk.CreateFirstUserResponse)
- func NewWithAPI(t *testing.T, options *Options) (*codersdk.Client, io.Closer, *coderd.API, codersdk.CreateFirstUserResponse)
- func NewWithDatabase(t *testing.T, options *Options) (*codersdk.Client, database.Store, codersdk.CreateFirstUserResponse)
- type LicenseOptions
- type Options
- type ProxyOptions
- type WorkspaceProxy
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Keys = map[string]ed25519.PublicKey{}
)
Functions ¶
func AddFullLicense ¶
AddFullLicense generates a license with all features enabled.
func AddLicense ¶
AddLicense generates a new license with the options provided and inserts it.
func GenerateLicense ¶
func GenerateLicense(t *testing.T, options LicenseOptions) string
GenerateLicense returns a signed JWT using the test key.
func NewWithAPI ¶
Types ¶
type LicenseOptions ¶
type Options ¶
type Options struct {
*coderdtest.Options
AuditLogging bool
BrowserOnly bool
EntitlementsUpdateInterval time.Duration
SCIMAPIKey []byte
UserWorkspaceQuota int
ProxyHealthInterval time.Duration
LicenseOptions *LicenseOptions
DontAddLicense bool
DontAddFirstUser bool
ReplicaSyncUpdateInterval time.Duration
ReplicaErrorGracePeriod time.Duration
ExternalTokenEncryption []dbcrypt.Cipher
ProvisionerDaemonPSK string
}
type ProxyOptions ¶
type ProxyOptions struct {
Name string
Experiments codersdk.Experiments
TLSCertificates []tls.Certificate
AppHostname string
DisablePathApps bool
DerpDisabled bool
DerpOnly bool
BlockDirect bool
// ProxyURL is optional
ProxyURL *url.URL
// Token is optional. If specified, a new workspace proxy region will not be
// created, and the proxy will become a replica of the existing proxy
// region.
Token string
// ReplicaPingCallback is optional.
ReplicaPingCallback func(replicas []codersdk.Replica, err string)
// FlushStats is optional
FlushStats chan chan<- struct{}
}
type WorkspaceProxy ¶ added in v2.8.5
func NewWorkspaceProxyReplica ¶ added in v2.8.5
func NewWorkspaceProxyReplica(t *testing.T, coderdAPI *coderd.API, owner *codersdk.Client, options *ProxyOptions) WorkspaceProxy
NewWorkspaceProxyReplica will configure a wsproxy.Server with the given options. The new wsproxy replica will register itself with the given coderd.API instance.
If a token is not provided, a new workspace proxy region is created using the owner client. If a token is provided, the proxy will become a replica of the existing proxy region.
Click to show internal directories.
Click to hide internal directories.