deployment

package
v0.0.60 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigName = "conductor-deployment.json"
View Source
const SeedName = "conductor-deployment-seed.json"

Variables

View Source
var DeploymentRunDir = dirs.Join(dirs.SelfRuntimeDir, "deployments")

Functions

func CGIFunctionServiceUnit added in v0.0.29

func CGIFunctionServiceUnit(name string, instance string) string

func CGIFunctionServiceUnitSingle added in v0.0.45

func CGIFunctionServiceUnitSingle(name string) string

func CGIFunctionSocketUnit added in v0.0.29

func CGIFunctionSocketUnit(name string) string

func DeploymentConfigUnit

func DeploymentConfigUnit(name string) string

func DeploymentDirByName

func DeploymentDirByName(name string, allow_dir bool) (string, string, error)

func DeploymentDirByNameOnly added in v0.0.59

func DeploymentDirByNameOnly(name string) string

func DeploymentSocketPath added in v0.0.29

func DeploymentSocketPath(name string) string

func DeploymentUnit

func DeploymentUnit(name string) string

Types

type Deployment

type Deployment struct {
	*service.Service
	Seed                 *DeploymentSeed     `json:"-"`
	ServiceDir           string              `json:"service_dir"`
	ServiceId            string              `json:"service_id"`
	DeploymentName       string              `json:"conductor_deployment"`
	PartName             string              `json:"part_name"`
	PartId               string              `json:"part_id"`
	PodName              string              `json:"pod_name"`
	TemplatedPod         string              `json:"templated_pod"`
	TemplatedConfigMap   string              `json:"templated_config_map"`
	TemplatedProxyConfig json.RawMessage     `json:"templated_proxy_config"`
	Pod                  *DeploymentPod      `json:"pod,omitempty"`
	Function             *DeploymentFunction `json:"function,omitempty"`
	ProxyConfigValue     caddy.ConfigItems   `json:"_proxy_config"`
}

func LoadDeployment

func LoadDeployment(fname string) (*Deployment, error)

func LoadDeploymentDir

func LoadDeploymentDir(dir string) (*Deployment, error)

func NewDeploymentFromService

func NewDeploymentFromService(service *service.Service, deployment_name string, seed *DeploymentSeed) *Deployment

func ReadDeployment

func ReadDeployment(dir, deployment_id string) (*Deployment, error)

func ReadDeploymentByName added in v0.0.15

func ReadDeploymentByName(name string, allow_dir bool) (*Deployment, error)

func (*Deployment) FindPodIPAddress

func (depl *Deployment) FindPodIPAddress() (string, error)

func (*Deployment) ProxyConfig added in v0.0.45

func (depl *Deployment) ProxyConfig(ctx context.Context) (caddy.ConfigItems, error)

func (*Deployment) RunHooks

func (depl *Deployment) RunHooks(ctx context.Context, when string, extend_timeout time.Duration) error

func (*Deployment) Save

func (depl *Deployment) Save(fname string) error

func (*Deployment) StartStopPod

func (depl *Deployment) StartStopPod(start bool, dir string) error

func (*Deployment) TemplateAll

func (depl *Deployment) TemplateAll(ctx context.Context) error

func (*Deployment) TemplateProxyConfig

func (depl *Deployment) TemplateProxyConfig(ctx context.Context) error

func (*Deployment) Vars

func (depl *Deployment) Vars() []string

type DeploymentFunction added in v0.0.29

type DeploymentFunction struct {
	*service.ServiceFunction
}

func (*DeploymentFunction) ProxyConfig added in v0.0.45

func (f *DeploymentFunction) ProxyConfig(depl *Deployment) (caddy.ConfigItems, error)

type DeploymentPod added in v0.0.20

type DeploymentPod struct {
	*service.ServicePod
	IPAddress string `json:"ip_address"`
}

func (*DeploymentPod) ProxyConfig added in v0.0.45

func (pod *DeploymentPod) ProxyConfig(depl *Deployment) (caddy.ConfigItems, error)

func (*DeploymentPod) TemplatePod added in v0.0.20

func (pod *DeploymentPod) TemplatePod(ctx context.Context, depl *Deployment) error

type DeploymentSeed added in v0.0.20

type DeploymentSeed struct {
	ServiceDir string                   `json:"service_dir"`
	ServiceId  string                   `json:"service_id"`
	PartName   string                   `json:"part_name"`
	PartId     string                   `json:"part_id"`
	IsPod      bool                     `json:"is_pod"`
	IsFunction bool                     `json:"is_function"`
	Pod        *service.ServicePod      `json:"-"`
	Function   *service.ServiceFunction `json:"-"`
}

func ReadSeed added in v0.0.20

func ReadSeed(fname string) (*DeploymentSeed, error)

func SeedFromService added in v0.0.20

func SeedFromService(service *service.Service, part string) (*DeploymentSeed, error)

func (DeploymentSeed) Prefix added in v0.0.20

func (seed DeploymentSeed) Prefix() string

Jump to

Keyboard shortcuts

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