Documentation
¶
Index ¶
- Constants
- Variables
- func ServiceConfigUnit(path string) string
- func ServiceDirByName(name string) (string, error)
- func ServiceDirFromUnit(u string) string
- func ServiceFileByName(name string) (string, error)
- func ServiceNameFromFile(service_file string) (string, error)
- func ServiceRealpath(service_dir string) (string, error)
- func ServiceUnit(path string) string
- func ServiceUnitByName(name string) (string, error)
- type CaddyConfig
- type ConfigValue
- type ConfigValueKind
- type HelpFlag
- type Hook
- type InheritFile
- type InheritFileBase
- type InheritedFile
- type InheritedFileSingle
- type Service
- type ServiceCommand
- type ServicePod
- type ServicePods
Constants ¶
View Source
const ( ConfigValueNull = 0 ConfigValueString = iota ConfigValueTrue ConfigValueFalse )
View Source
const ConfigName = "conductor-service.json"
Variables ¶
View Source
var ServiceDirs = dirs.MultiJoin("services", append([]string{dirs.SelfRuntimeDir}, append(dirs.SelfConfigDirs, dirs.SelfDataDirs...)...)...)
Functions ¶
func ServiceConfigUnit ¶
func ServiceDirByName ¶
func ServiceDirFromUnit ¶
func ServiceFileByName ¶
func ServiceNameFromFile ¶
func ServiceRealpath ¶
func ServiceUnit ¶
func ServiceUnitByName ¶
Types ¶
type CaddyConfig ¶
type CaddyConfig struct {
ApiEndpoint string `json:"api_endpoint"`
}
type ConfigValue ¶ added in v0.0.24
type ConfigValue struct {
Kind ConfigValueKind
Str string
}
func (*ConfigValue) MarshalJSON ¶ added in v0.0.24
func (v *ConfigValue) MarshalJSON() ([]byte, error)
func (*ConfigValue) String ¶ added in v0.0.24
func (v *ConfigValue) String() string
func (*ConfigValue) UnmarshalJSON ¶ added in v0.0.24
func (v *ConfigValue) UnmarshalJSON(data []byte) error
type ConfigValueKind ¶ added in v0.0.24
type ConfigValueKind int
type InheritFile ¶ added in v0.0.15
type InheritFile struct {
InheritFileBase
Inherit *InheritedFile
}
func (*InheritFile) UnmarshalJSON ¶ added in v0.0.15
func (f *InheritFile) UnmarshalJSON(data []byte) error
type InheritFileBase ¶ added in v0.0.15
type InheritedFile ¶ added in v0.0.15
type InheritedFile struct {
Inherit []*InheritFile `json:"inherit"`
}
func DecodeInherit ¶ added in v0.0.15
func DecodeInherit(data []byte, dir string) (*InheritedFile, error)
type InheritedFileSingle ¶ added in v0.0.15
type InheritedFileSingle struct {
Inherit *InheritFile `json:"inherit"`
}
type Service ¶
type Service struct {
BasePath string `json:"-"`
FileName string `json:"-"`
ConfigSetFile string `json:"-"`
Name string `json:"-"`
Id string `json:"-"`
Inherit *InheritedFile `json:"-"`
AppName string `json:"app_name,omitempty"` // my-app
InstanceName string `json:"instance_name,omitempty"` // staging
Config map[string]*ConfigValue `json:"config,omitempty"` // key-value pairs for config and templating, CHANNEL=staging
ProxyConfigTemplate string `json:"proxy_config_template,omitempty"` // Template file for the load-balancer config
Pods *ServicePods `json:"pods,omitempty"`
Hooks []*Hook `json:"hooks,omitempty"`
CaddyLoadBalancer CaddyConfig `json:"caddy_load_balancer"`
DisplayServiceConfig []string `json:"display_service_config"`
DisplayDeploymentConfig []string `json:"display_deployment_config"`
Commands map[string]*ServiceCommand `json:"commands"`
}
func LoadServiceByName ¶
func LoadServiceDir ¶
func LoadServiceFile ¶
func (*Service) FillDefaults ¶
func (*Service) UnitStatus ¶ added in v0.0.15
type ServiceCommand ¶ added in v0.0.15
type ServiceCommand struct {
Deployment bool `json:"deployment"`
Service bool `json:"service"`
ServiceAnyDeployment bool `json:"service_any_deployment"`
Description string `json:"description"`
Exec []string `json:"exec"`
HelpFlags [][]string `json:"help_flags"`
HelpArgs []string `json:"help_args"`
}
func (*ServiceCommand) GetHelpFlags ¶ added in v0.0.15
func (c *ServiceCommand) GetHelpFlags() []HelpFlag
func (*ServiceCommand) GetTabbedHelpFlags ¶ added in v0.0.15
func (c *ServiceCommand) GetTabbedHelpFlags() *utils.Tabbed
type ServicePod ¶ added in v0.0.20
type ServicePods ¶ added in v0.0.20
type ServicePods []*ServicePod
func (*ServicePods) FillDefaults ¶ added in v0.0.20
func (pods *ServicePods) FillDefaults(service *Service)
func (*ServicePods) FindMainPod ¶ added in v0.0.20
func (pods *ServicePods) FindMainPod() *ServicePod
func (*ServicePods) FindPod ¶ added in v0.0.20
func (pods *ServicePods) FindPod(name string) *ServicePod
func (*ServicePods) FixPaths ¶ added in v0.0.20
func (pods *ServicePods) FixPaths(dir string) error
func (*ServicePods) UnmarshalJSON ¶ added in v0.0.20
func (pods *ServicePods) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.