Back to godoc.org

Package provision

v0.0.18
Latest Go to latest

The highest tagged major version is .

Published: May 20, 2020 | License: Apache-2.0 | Module: code.cloudfoundry.org/cfdev

Index

Constants

const (
	Preparing     = "preparing"
	Deploying     = "deploying"
	RunningErrand = "running-errand"
)

type Bosh

type Bosh struct {
	Runner BoshRunner
}

func NewBosh

func NewBosh(runner BoshRunner) *Bosh

func (*Bosh) GetVMProgress

func (b *Bosh) GetVMProgress(start time.Time, deploymentName string, isErrand bool) VMProgress

type BoshRunner

type BoshRunner interface {
	Output(args ...string) ([]byte, error)
}

go:generate mockgen -package mocks -destination mocks/runner.go code.cloudfoundry.org/cfdev/provision BoshRunner

type Controller

type Controller struct {
	Config    config.Config
	Workspace *workspace.Workspace
}

func NewController

func NewController(config config.Config) *Controller

func (*Controller) DeployBosh

func (c *Controller) DeployBosh() error

func (*Controller) DeployService

func (c *Controller) DeployService(service workspace.Service, dockerRegistries []string) error

func (*Controller) DeployServices

func (c *Controller) DeployServices(ui UI, services []workspace.Service, dockerRegistries []string) error

func (*Controller) GetWhiteListedService

func (c *Controller) GetWhiteListedService(serviceName string, whiteList []workspace.Service) (*workspace.Service, error)

func (*Controller) Ping

func (c *Controller) Ping(duration time.Duration) error

func (*Controller) WhiteListServices

func (c *Controller) WhiteListServices(whiteList string, services []workspace.Service) ([]workspace.Service, error)

type Instance

type Instance struct {
	ID           string `json:"instance"`
	Process      string `json:"process"`
	ProcessState string `json:"process_state"`
}

type SSH

type SSH struct {
	Error error
	// contains filtered or unexported fields
}

func NewSSH

func NewSSH(
	ip string,
	port string,
	key []byte,
	timeout time.Duration,
	stdout io.Writer,
	stderr io.Writer,
) (*SSH, error)

func (*SSH) Close

func (s *SSH) Close()

func (*SSH) RetrieveFile

func (s *SSH) RetrieveFile(filePath string, remoteFilePath string)

func (*SSH) Run

func (s *SSH) Run(command string)

func (*SSH) SendData

func (s *SSH) SendData(srcData []byte, remoteFilePath string)

func (*SSH) SendFile

func (s *SSH) SendFile(filePath string, remoteFilePath string)

type UI

type UI interface {
	Say(message string, args ...interface{})
	Writer() io.Writer
}

type VMProgress

type VMProgress struct {
	State    string
	Total    int
	Done     int
	Duration time.Duration
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier