deployment

package
v1.27.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

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) Write

func (d *Deployment) Write(w io.Writer) error

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

type DeploymentOwnerRegistry struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL