Documentation
¶
Index ¶
- Variables
- func InheritFromEnvironment(assignments []string, names []string, prefix string) []string
- func InheritOptionsFromEnvironment[Map ~map[string]V, V any](assignments []string, options Map, prefix string) []string
- func ResolveAgentConfig(devConfig *config.Config, providerConfig *provider.ProviderConfig, ...) provider.ProviderAgentConfig
- func ResolveAndSaveOptionsMachine(ctx context.Context, req ResolveMachineRequest) (*provider.Machine, error)
- func ResolveAndSaveOptionsWorkspace(ctx context.Context, req ResolveWorkspaceRequest) (*provider.Workspace, error)
- func ResolveOptions(ctx context.Context, req ResolveOptionsRequest) (*config.Config, error)
- type ResolveMachineRequest
- type ResolveOptionsRequest
- type ResolveWorkspaceRequest
Constants ¶
This section is empty.
Variables ¶
var GitIdentityEnvVars = []string{
"GIT_AUTHOR_NAME",
"GIT_AUTHOR_EMAIL",
"GIT_AUTHOR_DATE",
"GIT_COMMITTER_NAME",
"GIT_COMMITTER_EMAIL",
"GIT_COMMITTER_DATE",
}
GitIdentityEnvVars are the git author/committer environment variables inherited from the host so commits made inside the workspace carry the user's identity.
Functions ¶
func InheritFromEnvironment ¶
Takes a list of assignments in KEY=VALUE format, a list of option names to check, and an environment variable prefix, and returns a new list with additional assignments from environment variables for any names not already assigned.
func InheritOptionsFromEnvironment ¶
func InheritOptionsFromEnvironment[Map ~map[string]V, V any]( assignments []string, options Map, prefix string, ) []string
Takes a list of assignments in KEY=VALUE format, a map of option to propagate, and an environment variable prefix, and returns a new list with additional assignments from environment variables for any options not already assigned.
func ResolveAgentConfig ¶
func ResolveAgentConfig( devConfig *config.Config, providerConfig *provider.ProviderConfig, workspace *provider.Workspace, machine *provider.Machine, ) provider.ProviderAgentConfig
ResolveAgentConfig resolves and returns the complete agent configuration for a provider. It merges configuration from the provider, workspace, machine, and devConfig, resolving all dynamic values and setting appropriate defaults for agent paths, Docker settings, Kubernetes settings, and credentials.
Parameters:
- devConfig: The Devsy configuration containing global settings
- providerConfig: The provider's configuration
- workspace: The workspace configuration (can be nil for machine-only operations)
- machine: The machine configuration (can be nil for workspace-only operations)
Returns a fully resolved ProviderAgentConfig ready for use by the agent.
func ResolveOptions ¶
Types ¶
type ResolveMachineRequest ¶
type ResolveMachineRequest struct {
DevConfig *config.Config
ProviderConfig *provider.ProviderConfig
OriginalMachine *provider.Machine
UserOptions map[string]string
}
ResolveMachineRequest is the input to ResolveAndSaveOptionsMachine.
type ResolveOptionsRequest ¶
type ResolveOptionsRequest struct {
DevConfig *config.Config
ProviderConfig *provider.ProviderConfig
UserOptions map[string]string
SkipRequired bool
SkipSubOptions bool
SingleMachine *bool
}
ResolveOptionsRequest carries the inputs of ResolveOptions.
type ResolveWorkspaceRequest ¶
type ResolveWorkspaceRequest struct {
DevConfig *config.Config
ProviderConfig *provider.ProviderConfig
OriginalWorkspace *provider.Workspace
UserOptions map[string]string
Options []resolver.Option
}
ResolveWorkspaceRequest carries the inputs of ResolveAndSaveOptionsWorkspace.