Documentation ¶
Index ¶
- Constants
- type CalculateCommandsArgs
- type CalculateGetStateQueryArgs
- type Command
- type Config
- type ConsoleLogger
- type DeploymentHook
- type Environment
- type Logger
- type ModuleManager
- type Package
- type PackageModule
- type PrefixLogger
- type Resource
- type ResourceManager
- type ServerConnection
- type ServerResource
- type ServerState
- type Template
- type TemplateSource
- type Tunnel
Constants ¶
View Source
const AgentPath = "/usr/local/bin/dogoagent"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CalculateCommandsArgs ¶
type CalculateCommandsArgs struct { Modules interface{} State interface{} LocalCommands *commandtree.RootCommand RemoteCommands *commandtree.RootCommand RemoteConnection ServerConnection Environment *Environment Config *Config Logf func(format string, args ...interface{}) Errf func(format string, args ...interface{}) Err func(err error) }
type Command ¶
type Command struct { Local bool `` /* 144-byte string literal not displayed */ Tunnels []string `description:"Tunnels required to execute this command. They'll be avalaible in the 'tunnels' template variable."` Commands []Template `required:"true" description:"The shell commands to run"` Target Template `` /* 159-byte string literal not displayed */ }
Command is a command added to a dogo configuration file
type Config ¶
type Config struct { Environments map[string]*Environment Packages map[string]*Package TemplateSource TemplateSource }
type ConsoleLogger ¶
type ConsoleLogger struct{}
func (*ConsoleLogger) Err ¶
func (l *ConsoleLogger) Err(err error)
func (*ConsoleLogger) Errf ¶
func (l *ConsoleLogger) Errf(format string, args ...interface{})
func (*ConsoleLogger) Logf ¶
func (l *ConsoleLogger) Logf(format string, args ...interface{})
func (*ConsoleLogger) SetProgress ¶
func (l *ConsoleLogger) SetProgress(progress float64)
type DeploymentHook ¶
type Environment ¶
type ModuleManager ¶
type ModuleManager struct { Name string ModulePrototype interface{} StatePrototype interface{} CalculateGetStateQuery func(c *CalculateGetStateQueryArgs) (interface{}, error) GetState func(query interface{}) (interface{}, error) CalculateCommands func(c *CalculateCommandsArgs) error GobRegister func() }
ModuleManager manages state for a piece of software on a server
type PackageModule ¶
type PrefixLogger ¶
func (*PrefixLogger) Err ¶
func (l *PrefixLogger) Err(err error)
func (*PrefixLogger) Errf ¶
func (l *PrefixLogger) Errf(format string, args ...interface{})
func (*PrefixLogger) Logf ¶
func (l *PrefixLogger) Logf(format string, args ...interface{})
func (*PrefixLogger) SetProgress ¶
func (l *PrefixLogger) SetProgress(progress float64)
type Resource ¶
type Resource struct { Name string Manager *ResourceManager ManagerGroup interface{} Resource interface{} ProvisioningGroup int Packages map[string]bool // packagename => used on this resource Data map[string]interface{} Modules map[string]interface{} }
Resource represents a resource in a deployment infrastructure, such as a server or load balancer or firewall
type ResourceManager ¶
type ServerConnection ¶
type ServerConnection interface { Shell(cmd string, stderr, stdout io.Writer, stdin io.Reader, width, height int) error ExecutePipeCommand(command string, pipesFunc func(reader io.Reader, errorReader io.Reader, writer io.Writer) error) error ExecuteCommand(command string) (string, error) WriteFile(path string, mode os.FileMode, contentLength int64, content io.Reader, sudo bool, progress func(float64)) error StartTunnel(localPort int, remotePort int, remoteHost string, reverse bool) (listeningLocalPort int, err error) Close() error }
ServerConnection is a connection to a ServerResource
type ServerResource ¶
type ServerResource interface {
OpenConnection() (ServerConnection, error)
}
ServerResource is a resource we can connect via SSH
type ServerState ¶
type ServerState struct { Version string OS string Arch string UID int Modules map[string]interface{} }
ServerState is the current state of several modules on a server
type TemplateSource ¶
Click to show internal directories.
Click to hide internal directories.