Documentation
¶
Index ¶
- Constants
- func CreateTarFromFiles(files map[string][]byte) ([]byte, error)
- func DupClientCopyingHeaders(client *codersdk.Client, header http.Header) (*codersdk.Client, error)
- func GenerateUserIdentifier(id string) (username, email string, err error)
- func GenerateWorkspaceName(id string) (name string, err error)
- func IsScaleTestUser(username, email string) bool
- func IsScaleTestWorkspace(workspaceName, ownerName string) bool
- type SyncWriter
Constants ¶
const ( // Prefix for all scaletest resources (users and workspaces) ScaleTestPrefix = "scaletest" // Email domain for scaletest users EmailDomain = "@scaletest.local" DefaultRandLength = 8 )
Variables ¶
This section is empty.
Functions ¶
func CreateTarFromFiles ¶ added in v2.29.0
func DupClientCopyingHeaders ¶ added in v2.30.0
DupClientCopyingHeaders duplicates the Client, but with an independent underlying HTTP transport, so that it will not share connections with the client being duplicated. It copies any headers already on the existing transport as codersdk.HeaderTransport and add the headers in the argument.
func GenerateUserIdentifier ¶ added in v2.27.0
GenerateUserIdentifier generates a username and email for scale testing. The username follows the pattern: scaletest-<random>-<id> The email follows the pattern: <random>-<id>@scaletest.local
func GenerateWorkspaceName ¶ added in v2.27.0
GenerateWorkspaceName generates a workspace name for scale testing. The workspace name follows the pattern: scaletest-<random>-<id>
func IsScaleTestUser ¶ added in v2.27.0
IsScaleTestUser checks if a username indicates it was created for scale testing.
func IsScaleTestWorkspace ¶ added in v2.27.0
IsScaleTestWorkspace checks if a workspace name indicates it was created for scale testing.
Types ¶
type SyncWriter ¶
type SyncWriter struct {
// contains filtered or unexported fields
}
SyncWriter wraps an io.Writer in a sync.Mutex.
func NewSyncWriter ¶
func NewSyncWriter(w io.Writer) *SyncWriter
func (*SyncWriter) Close ¶
func (sw *SyncWriter) Close() error