commands

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildCommand = &cli.Command{
	Name:         "build",
	Usage:        "Build service(s)",
	Action:       BeforeAfterWrapper(BuildAction),
	BashComplete: ServicesBashComplete,
}
View Source
var ExportCommand = &cli.Command{
	Name:         "export",
	Usage:        "Export those *#%&! env vars ",
	Action:       BeforeAfterWrapper(ExportAction),
	BashComplete: ServicesBashComplete,
}
View Source
var InstallCommand = &cli.Command{
	Name:         "install",
	Usage:        "Installs all the services",
	Action:       BeforeAfterWrapper(InstallAction),
	BashComplete: ServicesBashComplete,
}
View Source
var LogsCommand = &cli.Command{
	Name:         "logs",
	Usage:        "Aggregate services logs",
	Action:       BeforeAfterWrapper(LogsAction),
	BashComplete: ServicesBashComplete,
}
View Source
var PsCommand = &cli.Command{
	Name:         "ps",
	Usage:        "Outputs the status of all services",
	Action:       BeforeAfterWrapper(PsAction),
	BashComplete: ServicesBashComplete,
}
View Source
var RestartCommand = &cli.Command{
	Name:         "restart",
	Usage:        "Restarts all the services",
	Action:       BeforeAfterWrapper(RestartAction),
	BashComplete: ServicesBashComplete,
	Flags: []cli.Flag{
		&cli.BoolFlag{
			Name:  "attach, a",
			Usage: "Attach to services output after start",
		},
		&cli.BoolFlag{
			Name:  "logs, l",
			Usage: "Start logging after start",
		},
	},
}
View Source
var StartCommand = &cli.Command{
	Name:         "start",
	Usage:        "Starts all the services",
	Action:       BeforeAfterWrapper(StartAction),
	BashComplete: ServicesBashComplete,
	Flags: []cli.Flag{
		&cli.BoolFlag{
			Name:  "attach, a",
			Usage: "Attach to services output after start",
		},
		&cli.BoolFlag{
			Name:  "logs, l",
			Usage: "Start logging after start",
		},
	},
}
View Source
var StopCommand = &cli.Command{
	Name:         "stop",
	Usage:        "Stops all the services",
	Action:       BeforeAfterWrapper(StopAction),
	BashComplete: ServicesBashComplete,
}
View Source
var TestCommand = &cli.Command{
	Name:         "test",
	Usage:        "Runs go test ./... for every service",
	Action:       BeforeAfterWrapper(TestAction),
	BashComplete: ServicesBashComplete,
	Flags: []cli.Flag{
		&cli.BoolFlag{
			Name:  "verbose, v",
			Usage: "Verbose output: log all tests as they are run",
		},
		&cli.BoolFlag{
			Name:  "race, r",
			Usage: "Enable data race detection",
		},
	},
}

Functions

func BeforeAfterWrapper

func BeforeAfterWrapper(f func(c *cli.Context) error) func(c *cli.Context) error

func BuildAction

func BuildAction(c *cli.Context) error

func ConsumeLogs

func ConsumeLogs()

func ExportAction

func ExportAction(c *cli.Context) error

func FilterServices

func FilterServices(c *cli.Context) map[string]*services.Service

This is temporary, very very alpha and may change soon

func GetEnvForService

func GetEnvForService(c *cli.Context, service *services.Service) []string

GetEnvForService returns all the environment variables for a given service including the ones specified in the global config

func HasErrors

func HasErrors() bool

func InstallAction

func InstallAction(c *cli.Context) error

InstallAction installs all the services (or the specified ones)

func LogsAction

func LogsAction(c *cli.Context) error

func PsAction

func PsAction(c *cli.Context) error

PsAction checks the status for every service and output

func RestartAction

func RestartAction(c *cli.Context) error

RestartAction restarts all the services (or the specified ones)

func ServicesBashComplete

func ServicesBashComplete(c *cli.Context)

func StartAction

func StartAction(c *cli.Context) error

StartAction starts all the services (or the specified ones)

func StopAction

func StopAction(c *cli.Context) error

StopAction stops all the services (or the specified ones)

func TailServiceLog

func TailServiceLog(service *services.Service, wg *sync.WaitGroup)

func TestAction

func TestAction(c *cli.Context) error

StartAction starts all the services (or the specified ones)

Types

This section is empty.

Jump to

Keyboard shortcuts

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