ops

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2016 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(fromWithHost, toWithHost string, appConfig *Config) error

func ExecuteTaskGroupOnServer

func ExecuteTaskGroupOnServer(client *ssh.Client, group string, config *Config) (string, error)

*

Execute a task group on the server

func ExecuteTaskOnServer

func ExecuteTaskOnServer(client *ssh.Client, taskType string, taskValue string, config *Config) (string, error)

*

Execute the current task on the server

func ExecuteTasksOnServer

func ExecuteTasksOnServer(client *ssh.Client, tasks []map[string]string, variables map[string]string, config *Config) error

*

Execute a list of tasks on the connected server based on the provided config and with the list of variables as the current context

func ExpandVariables

func ExpandVariables(data string, variables map[string]string) string

func OpenTerminalToServer

func OpenTerminalToServer(name string, appConfig *Config) error

func ProvisionEnvironment

func ProvisionEnvironment(env string, config *Config) error

*

Provision an environment based on the loaded configuration file

func ProvisionGroup

func ProvisionGroup(group string, variables map[string]string, config *Config) error

*

Provision a specific group from the config using the given variables

func ProvisionServer

func ProvisionServer(name string, tasks []map[string]string, checks []map[string]string, variables map[string]string, config *Config) error

*

Provision a single server with the list of tasks and variables

func SplitIdentifierFromPath

func SplitIdentifierFromPath(pathWithHost string) (string, string)

*

Split the server name from the path on that server

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

config contains the contents of the loaded configuration file and provides methods for easily retrieving it's data

func NewConfig

func NewConfig(config *viper.Viper) *Config

*

Create a new Config object based on a viper config

func (*Config) GetChecksForGroup

func (config *Config) GetChecksForGroup(group string) []map[string]string

*

Retrieve the list of checks for a specific group

func (*Config) GetGroupsForEnv

func (config *Config) GetGroupsForEnv(env string) []string

*

Retrieve the list of groups for the specified environment

func (*Config) GetServer

func (config *Config) GetServer(name string) (map[string]string, error)

*

Retrieve the connection details for a specific server

func (*Config) GetServersForGroup

func (config *Config) GetServersForGroup(group string) []string

*

Retrieve the list of servers contained in a group

func (*Config) GetTasksForGroup

func (config *Config) GetTasksForGroup(group string) []map[string]string

*

Retrieve the list of tasks that should be executed for a group

func (*Config) GetTasksForTaskGroup

func (config *Config) GetTasksForTaskGroup(taskGroup string) []map[string]string

*

Retrieve the list of tasks included in a task group

func (*Config) GetVariablesForEnv

func (config *Config) GetVariablesForEnv(env string) map[string]string

*

Retrieve the list of variables for the specified environment from the config file and from the OS

Jump to

Keyboard shortcuts

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