Documentation
¶
Index ¶
- Variables
- func GetDeploymentPath(base util.AbsolutePath, name string) util.AbsolutePath
- func GetDeploymentsPath(base util.AbsolutePath) util.AbsolutePath
- func ListDeploymentFiles(base util.AbsolutePath) ([]util.AbsolutePath, error)
- func SaveNameFromPath(path util.AbsolutePath) string
- func ValidateFile(path util.AbsolutePath) error
- type ConnectCloud
- type Deployment
- type DeploymentOwnerRegistry
Constants ¶
This section is empty.
Variables ¶
View Source
var DeploymentRecordMutex sync.Mutex
Functions ¶
func GetDeploymentPath ¶
func GetDeploymentPath(base util.AbsolutePath, name string) util.AbsolutePath
func GetDeploymentsPath ¶
func GetDeploymentsPath(base util.AbsolutePath) util.AbsolutePath
func ListDeploymentFiles ¶
func ListDeploymentFiles(base util.AbsolutePath) ([]util.AbsolutePath, error)
func SaveNameFromPath ¶
func SaveNameFromPath(path util.AbsolutePath) string
func ValidateFile ¶
func ValidateFile(path util.AbsolutePath) error
Types ¶
type ConnectCloud ¶ added in v1.19.0
type ConnectCloud struct {
AccountName string `toml:"account_name" json:"accountName"`
}
type Deployment ¶
type Deployment struct {
// Predeployment and full deployment fields
Schema string `toml:"$schema" json:"$schema"`
ServerType server_type.ServerType `toml:"server_type" json:"serverType"`
ServerURL string `toml:"server_url" json:"serverUrl"`
ClientVersion string `toml:"client_version" json:"-"`
CreatedAt string `toml:"created_at" json:"createdAt"`
DismissedAt string `toml:"dismissed_at" json:"dismissedAt"`
Type contenttypes.ContentType `toml:"type" json:"type"`
ConfigName string `toml:"configuration_name" json:"configurationName"`
ID types.ContentID `toml:"id,omitempty" json:"id"`
DashboardURL string `toml:"dashboard_url,omitempty" json:"dashboardUrl"`
DirectURL string `toml:"direct_url,omitempty" json:"directUrl"`
LogsURL string `toml:"logs_url,omitempty" json:"logsUrl"`
ConnectCloud *ConnectCloud `toml:"connect_cloud,omitempty" json:"connectCloud"`
// Full deployment fields
DeployedAt string `toml:"deployed_at,omitempty" json:"deployedAt"`
BundleID types.BundleID `toml:"bundle_id,omitempty" json:"bundleId"`
BundleURL string `toml:"bundle_url,omitempty" json:"bundleUrl"`
Error *types.AgentError `toml:"deployment_error,omitempty" json:"deploymentError"`
Files []string `toml:"files,multiline,omitempty" json:"files"`
Requirements []string `toml:"requirements,multiline,omitempty" json:"requirements"`
Configuration *config.Config `toml:"configuration,omitempty" json:"configuration"`
Renv *renv.Lockfile `toml:"renv,omitempty" json:"renv"`
}
func FromFile ¶
func FromFile(path util.AbsolutePath) (*Deployment, error)
func New ¶
func New() *Deployment
func (*Deployment) IsDeployed ¶ added in v1.4.0
func (d *Deployment) IsDeployed() bool
func (*Deployment) PopulateDefaults ¶ added in v1.19.0
func (d *Deployment) PopulateDefaults()
func (*Deployment) WriteFile ¶
func (d *Deployment) WriteFile( path util.AbsolutePath, localIdIfDeploying string, log logging.Logger, ) (*Deployment, error)
When being called from methods active during a deployment, they will be running within a go function with a state which includes a localID. By supplying it when calling this method, they protect the deployment file from being updated by any methods active but not current.
NOTE: deployment threads currently run to completion, so when a user "dismisses" a deployment the go functions continue to want to update the record (even though they might be "old" news)
type DeploymentOwnerRegistry ¶ added in v1.10.0
Copyright (C) 2023 by Posit Software, PBC.
var ActiveDeploymentRegistry DeploymentOwnerRegistry = DeploymentOwnerRegistry{ // contains filtered or unexported fields }
func (*DeploymentOwnerRegistry) Check ¶ added in v1.10.0
func (o *DeploymentOwnerRegistry) Check(deploymentPath string, localId string) bool
func (*DeploymentOwnerRegistry) Clear ¶ added in v1.10.0
func (o *DeploymentOwnerRegistry) Clear(deploymentPath string, localId string)
func (*DeploymentOwnerRegistry) Reset ¶ added in v1.10.0
func (o *DeploymentOwnerRegistry) Reset()
func (*DeploymentOwnerRegistry) Set ¶ added in v1.10.0
func (o *DeploymentOwnerRegistry) Set(deploymentPath string, localId string)
Click to show internal directories.
Click to hide internal directories.