v0.6.0 Latest Latest

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 18 Imported by: 30




This section is empty.


This section is empty.


func NewCelleryFileSystem

func NewCelleryFileSystem() (*celleyFileSystem, error)

NewCelleryFileSystem returns a celleyFileSystem instance.

func SetBallerinaExecutor

func SetBallerinaExecutor(balExecutor ballerina.BalExecutor) func(*CelleryCli)

func SetCredManager

func SetCredManager(credManager credentials.CredManager) func(*CelleryCli)

func SetCredReader added in v0.6.0

func SetCredReader(credReader credentials.CredReader) func(*CelleryCli)

func SetFileSystem

func SetFileSystem(manager FileSystemManager) func(*CelleryCli)

func SetRegistry

func SetRegistry(registry registry.Registry) func(*CelleryCli)

func SetRuntime added in v0.6.0

func SetRuntime(runtime cliRuntime.Runtime) func(*CelleryCli)


type CelleryCli

type CelleryCli struct {
	// contains filtered or unexported fields

CelleryCli is an instance of the cellery command line client. Instances of the client can be returned from NewCelleryCli.

func NewCelleryCli

func NewCelleryCli(opts ...func(*CelleryCli)) *CelleryCli

NewCelleryCli returns a CelleryCli instance.

func (*CelleryCli) BalExecutor

func (cli *CelleryCli) BalExecutor() ballerina.BalExecutor

BalExecutor returns a BalExecutor instance.

func (*CelleryCli) CredManager

func (cli *CelleryCli) CredManager() credentials.CredManager

CredManager returns a CredManager instance.

func (*CelleryCli) CredReader added in v0.6.0

func (cli *CelleryCli) CredReader() credentials.CredReader

CredReader returns a CredReader instance.

func (*CelleryCli) DockerCli

func (cli *CelleryCli) DockerCli() docker.Docker

FileSystem returns FileSystemManager instance.

func (*CelleryCli) ExecuteTask

func (cli *CelleryCli) ExecuteTask(startMessage, errorMessage, successMessage string, function func() error) error

ExecuteTask executes a function. It starts a spinner upon starting function execution. Spinner exits with a success message (optional) if the function execution was successful. Spinner exists with an error message (optional) if the function execution failed.

func (*CelleryCli) ExecuteUserSelection added in v0.6.0

func (cli *CelleryCli) ExecuteUserSelection(prompt string, options []Selection) error

func (*CelleryCli) FileSystem

func (cli *CelleryCli) FileSystem() FileSystemManager

FileSystem returns a FileSystemManager instance.

func (*CelleryCli) KubeCli

func (cli *CelleryCli) KubeCli() kubernetes.KubeCli

KubeCli returns a KubeCli instance.

func (*CelleryCli) OpenBrowser

func (cli *CelleryCli) OpenBrowser(url string) error

OpenBrowser opens up the provided URL in a browser

func (*CelleryCli) Out

func (cli *CelleryCli) Out() io.Writer

Out returns the writer used for the stdout.

func (*CelleryCli) Registry

func (cli *CelleryCli) Registry() registry.Registry

Registry returns a registry instance.

func (*CelleryCli) Runtime added in v0.6.0

func (cli *CelleryCli) Runtime() cliRuntime.Runtime

Runtime returns a Runtime instance.

func (*CelleryCli) Sleep added in v0.6.0

func (cli *CelleryCli) Sleep(seconds time.Duration)

type Cli

type Cli interface {
	Out() io.Writer
	ExecuteTask(startMessage, errorMessage, successMessage string, function func() error) error
	FileSystem() FileSystemManager
	BalExecutor() ballerina.BalExecutor
	KubeCli() kubernetes.KubeCli
	Registry() registry.Registry
	OpenBrowser(url string) error
	DockerCli() docker.Docker
	CredManager() credentials.CredManager
	CredReader() credentials.CredReader
	Runtime() cliRuntime.Runtime
	Sleep(seconds time.Duration)
	ExecuteUserSelection(prompt string, options []Selection) error

Cli represents the cellery command line client.

type FileSystemManager

type FileSystemManager interface {
	CurrentDir() string
	UserHome() string
	TempDir() string
	Repository() string
	CelleryInstallationDir() string
	WorkingDirRelativePath() string

type Platform added in v0.6.0

type Platform interface {
	CreateK8sCluster() (string, error)
	ConfigureSqlInstance() (runtime.MysqlDb, error)
	CreateStorage() error
	CreateNfs() (runtime.Nfs, error)
	UpdateKubeConfig() error
	RemoveCluster() error
	RemoveSqlInstance() error
	RemoveFileSystem() error
	RemoveStorage() error
	ClusterName() string

type Selection added in v0.6.0

type Selection struct {
	Number   int
	Label    string
	Function func() error

Jump to

Keyboard shortcuts

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