cfbackup

package module
v0.1.47 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2016 License: Apache-2.0 Imports: 26 Imported by: 10

README

cfbackup

Cloud Foundry Backup Utilities

wercker status

GoDoc

this repo is meant to be included in other projects. It will provide method calls for backing up Ops Manager and Elastic Runtime.

Running tests / build pipeline locally (docker-machine)


# install the wercker cli
$ curl -L https://install.wercker.com | sh

# make sure a docker host is running
$ docker-machine start default && eval $(docker-machine env default)

# run the build pipeline locally, to test your code locally
$ ./testrunner

Running tests / build pipeline locally (boot2docker)


# install the wercker cli
$ curl -L https://install.wercker.com | sh

# make sure a docker host is running
$ boot2docker up && $(boot2docker shellinit)

# run the build pipeline locally, to test your code locally
$ ./testrunner

Documentation

Index

Constants

View Source
const (
	//BackupLoggerName --
	BackupLoggerName = "Backup"
	//RestoreLoggerName --
	RestoreLoggerName = "Restore"
)
View Source
const (
	//AccessKeyIDVarname - s3 key flag
	AccessKeyIDVarname = "S3_ACCESS_KEY_ID"
	//SecretAccessKeyVarname - s3 secret key
	SecretAccessKeyVarname = "S3_SECRET_ACCESS_KEY"
	//BucketNameVarname - bucket name var flag
	BucketNameVarname = "S3_BUCKET_NAME"
	//S3Domain - s3 domain value
	S3Domain = "S3_DOMAIN"
	//IsS3Varname - s3 persistence true|false
	IsS3Varname = "S3_ACTIVE"
)
View Source
const (
	//ERDefaultSystemUser - default user for system vms
	ERDefaultSystemUser = "vcap"
	//ERDirectorInfoURL - url format for a director info endpoint
	ERDirectorInfoURL = "https://%s:25555/info"
	//ERBackupDir - default er backup dir
	ERBackupDir = "elasticruntime"
	//ERVmsURL - url format for a vms url
	ERVmsURL = "https://%s:25555/deployments/%s/vms"
	//ERDirector -- key
	ERDirector = "DirectorInfo"
	//ERConsole -- key
	ERConsole = "ConsoledbInfo"
	//ERUaa -- key
	ERUaa = "UaadbInfo"
	//ERCc -- key
	ERCc = "CcdbInfo"
	//ERMySql -- key
	ERMySql = "MysqldbInfo"
	//ERNfs -- key
	ERNfs = "NfsInfo"
	//ERBackupFileFormat -- format of archive filename
	ERBackupFileFormat = "%s.backup"
	//ERInvalidDirectorCredsMsg -- error message for invalid creds on director
	ERInvalidDirectorCredsMsg = "invalid director credentials"
	//ERNoPersistenceArchives -- error message for persistence stores
	ERNoPersistenceArchives = "there are no persistence stores in the list"
	//ERFileDoesNotExist -- error message for file does not exist
	ERFileDoesNotExist = "file does not exist"
	//ErrERDBBackupFailure -- error message for backup failure
	ErrERDBBackupFailure = "failed to backup database"
	//ERVersionEnvFlag -- env flag from ER version toggle
	ERVersionEnvFlag = "ER_VERSION"
	//ERVersion16 -- value for 1.6 toggle
	ERVersion16 = "1.6"
)
View Source
const (
	//ImportArchive --
	ImportArchive = iota
	//ExportArchive --
	ExportArchive
)
View Source
const (
	//NfsDirPath - this is where the nfs store lives
	NfsDirPath string = "/var/vcap/store"
	//NfsArchiveDir - this is the archive dir name
	NfsArchiveDir string = "shared"
	//NfsDefaultSSHUser - this is the default ssh user for nfs
	NfsDefaultSSHUser string = "vcap"
)
View Source
const (
	OpsMgrInstallationSettingsFilename    string = "installation.json"
	OpsMgrInstallationAssetsFileName      string = "installation.zip"
	OpsMgrInstallationAssetsPostFieldName string = "installation[file]"
	OpsMgrDeploymentsFileName             string = "deployments.tar.gz"
	OpsMgrEncryptionKeyFileName           string = "cc_db_encryption_key.txt"
	OpsMgrBackupDir                       string = "opsmanager"
	OpsMgrDeploymentsDir                  string = "deployments"
	OpsMgrDefaultSSHPort                  int    = 22
	OpsMgrInstallationSettingsURL         string = "https://%s/api/installation_settings"
	OpsMgrInstallationAssetsURL           string = "https://%s/api/installation_asset_collection"
	OpsMgrDeploymentsFile                 string = "/var/tempest/workspaces/default/deployments/bosh-deployments.yml"
)

Ops Manager Backup constants

View Source
const (
	//SDProduct --
	SDProduct string = "Product"
	//SDComponent --
	SDComponent string = "Component"
	//SDIdentity --
	SDIdentity string = "Identity"
	//SDIP --
	SDIP string = "Ip"
	//SDUser --
	SDUser string = "User"
	//SDPass --
	SDPass string = "Pass"
	//SDVcapUser --
	SDVcapUser string = "VcapUser"
	//SDVcapPass --
	SDVcapPass string = "VcapPass"
)

Variables

View Source
var (
	//TileRestoreAction -- executes a restore action on the given tile
	TileRestoreAction = func(t Tile) func() error {
		return t.Restore
	}
	//TileBackupAction - executes a backup action on a given tile
	TileBackupAction = func(t Tile) func() error {
		return t.Backup
	}
)
View Source
var (
	//ErrERDirectorCreds - error for director creds
	ErrERDirectorCreds = errors.New(ERInvalidDirectorCredsMsg)
	//ErrEREmptyDBList - error for db list empty
	ErrEREmptyDBList = errors.New(ERNoPersistenceArchives)
	//ErrERInvalidPath - invalid filepath error
	ErrERInvalidPath = &os.PathError{Err: errors.New(ERFileDoesNotExist)}
	//ErrERDBBackup - error for db backup failures
	ErrERDBBackup = errors.New(ErrERDBBackupFailure)
)
View Source
var (
	//ErrNoSSLKeyFound - error if there are no ssl keys found in the iaas config block of installationsettings
	ErrNoSSLKeyFound = errors.New("no ssl key found in iaas config")
)
View Source
var GetInstallationSettings = func(tileSpec tileregistry.TileSpec) (settings io.Reader, err error) {
	var (
		opsManager *OpsManager
	)

	if opsManager, err = NewOpsManager(tileSpec.OpsManagerHost, tileSpec.AdminUser, tileSpec.AdminPass, tileSpec.OpsManagerUser, tileSpec.OpsManagerPass, tileSpec.ArchiveDirectory); err == nil {
		settings, err = opsManager.GetInstallationSettings()
	}
	return
}

GetInstallationSettings - makes a call to ops manager and returns a io.reader containing the contents of the installation settings file.

View Source
var NewDirector = func(ip, username, password string, port int) bosh.Bosh {
	return bosh.NewBoshDirector(ip, username, password, port, NewHttpGateway())
}

NewDirector - a function representing a constructor for a director object

View Source
var NewElasticRuntime = func(jsonFile string, target string) *ElasticRuntime {
	var (
		uaadbInfo *PgInfo = &PgInfo{
			SystemInfo: SystemInfo{
				Product:   "cf",
				Component: "uaadb",
				Identity:  "root",
			},
			Database: "uaa",
		}
		consoledbInfo *PgInfo = &PgInfo{
			SystemInfo: SystemInfo{
				Product:   "cf",
				Component: "consoledb",
				Identity:  "root",
			},
			Database: "console",
		}
		ccdbInfo *PgInfo = &PgInfo{
			SystemInfo: SystemInfo{
				Product:   "cf",
				Component: "ccdb",
				Identity:  "admin",
			},
			Database: "ccdb",
		}
		mysqldbInfo *MysqlInfo = &MysqlInfo{
			SystemInfo: SystemInfo{
				Product:   "cf",
				Component: "mysql",
				Identity:  "root",
			},
			Database: "mysql",
		}
		directorInfo *SystemInfo = &SystemInfo{
			Product:   BoshName(),
			Component: "director",
			Identity:  "director",
		}
		nfsInfo *NfsInfo = &NfsInfo{
			SystemInfo: SystemInfo{
				Product:   "cf",
				Component: "nfs_server",
				Identity:  "vcap",
			},
		}
	)

	context := &ElasticRuntime{
		JSONFile:      jsonFile,
		BackupContext: NewBackupContext(target, cfenv.CurrentEnv()),
		SystemsInfo: map[string]SystemDump{
			ERDirector: directorInfo,
			ERConsole:  consoledbInfo,
			ERUaa:      uaadbInfo,
			ERCc:       ccdbInfo,
			ERMySql:    mysqldbInfo,
			ERNfs:      nfsInfo,
		},
		PersistentSystems: []SystemDump{
			consoledbInfo,
			uaadbInfo,
			ccdbInfo,
			nfsInfo,
			mysqldbInfo,
		},
	}
	return context
}

NewElasticRuntime initializes an ElasticRuntime intance

View Source
var NewOpsManager = func(opsManagerHostname string, adminUsername string, adminPassword string, opsManagerUsername string, opsManagerPassword string, target string) (context *OpsManager, err error) {
	var remoteExecuter command.Executer

	if remoteExecuter, err = createExecuter(opsManagerHostname, opsManagerUsername, opsManagerPassword, OpsMgrDefaultSSHPort); err == nil {
		backupContext := NewBackupContext(target, cfenv.CurrentEnv())
		settingsHTTPRequestor := ghttp.NewHttpGateway()
		settingsMultiHTTPRequestor := GetUploader(backupContext)
		assetsHTTPRequestor := ghttp.NewHttpGateway()
		assetsMultiHTTPRequestor := GetUploader(backupContext)

		context = &OpsManager{
			SettingsUploader:    settingsMultiHTTPRequestor,
			AssetsUploader:      assetsMultiHTTPRequestor,
			SettingsRequestor:   settingsHTTPRequestor,
			AssetsRequestor:     assetsHTTPRequestor,
			DeploymentDir:       path.Join(target, OpsMgrBackupDir, OpsMgrDeploymentsDir),
			Hostname:            opsManagerHostname,
			Username:            adminUsername,
			Password:            adminPassword,
			BackupContext:       backupContext,
			Executer:            remoteExecuter,
			LocalExecuter:       command.NewLocalExecuter(),
			OpsmanagerBackupDir: OpsMgrBackupDir,
		}
	}
	return
}

NewOpsManager initializes an OpsManager instance

NfsNewRemoteExecuter - this is a function which is able to execute a remote command against the nfs server

View Source
var RunPipeline = func(actionBuilder func(Tile) func() error, tiles []Tile) (err error) {
	var pipeline []action

	for _, tile := range tiles {
		pipeline = append(pipeline, actionBuilder(tile))
	}
	err = runActions(pipeline)
	return
}

Runs a pipeline action (restore/backup) on a list of tiles

View Source
var TaskPingFreq = 1000 * time.Millisecond

Not ping server so frequently and exausted the resources

Functions

func BackupNfs

func BackupNfs(password, ip string, dest io.Writer) (err error)

BackupNfs - this function will execute the nfs backup process

func BoshName added in v0.1.28

func BoshName() (bosh string)

BoshName - function which returns proper bosh component name for given version

func ExtractEncryptionKey

func ExtractEncryptionKey(dest io.Writer, deploymentDir string) (err error)

ExtractEncryptionKey - extract the encryptionKey from a deployment archive

func GetDeploymentName

func GetDeploymentName(jsonObj InstallationCompareObject) (deploymentName string, err error)

GetDeploymentName - returns the name of the deployment

func GetPasswordAndIP

func GetPasswordAndIP(jsonObj InstallationCompareObject, product, component, username string) (ip, password string, err error)

GetPasswordAndIP - returns password and ip from the installation settings from a given component

func GetUploader added in v0.1.43

func GetUploader(backupContext BackupContext) (uploader httpUploader)

GetUploader - returns an uploader from a given backup context

func RunBackupPipeline

func RunBackupPipeline(hostname, adminUsername, adminPassword, opsManagerUsername, opsManagerPassword, destination string) (err error)

RunBackupPipeline - Backup the list of all default tiles

func RunRestorePipeline

func RunRestorePipeline(hostname, adminUsername, adminPassword, opsManagerUser, opsManagerPassword, destination string) (err error)

RunRestorePipeline - Restore the list of all default tiles

func SetPGDumpUtilVersions added in v0.1.30

func SetPGDumpUtilVersions()

SetPGDumpUtilVersions -- set version paths for pgdump/pgrestore utils

Types

type BackupContext

type BackupContext struct {
	TargetDir string
	IsS3      bool
	StorageProvider
}

BackupContext - stores the base context information for a backup/restore

func NewBackupContext added in v0.1.34

func NewBackupContext(targetDir string, env map[string]string) (backupContext BackupContext)

NewBackupContext initializes a BackupContext

type CCJob added in v0.1.2

type CCJob struct {
	Job   string
	Index int
}

CCJob - a cloud controller job object

func GetCCVMs

func GetCCVMs(jsonObj []VMObject) ([]CCJob, error)

GetCCVMs - a function to get a list of ccjobs

type CloudController

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

CloudController - a struct representing a cloud controller

func NewCloudController

func NewCloudController(ip, username, password, deploymentName, manifest string, cloudControllers CloudControllerJobs) *CloudController

NewCloudController - a function representing a constructor for a cloud controller

func (*CloudController) Start

func (c *CloudController) Start() error

Start - a method to execute a start event on a cloud controller

func (*CloudController) Stop

func (c *CloudController) Stop() error

Stop - a method which executes a stop against a cloud controller

type CloudControllerDeploymentParser

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

CloudControllerDeploymentParser - a struct which will handle the parsing of deployments

func (*CloudControllerDeploymentParser) Parse

func (s *CloudControllerDeploymentParser) Parse(jsonObj []VMObject) ([]CCJob, error)

Parse - a method which will parse a given vmobject array

type CloudControllerJobs

type CloudControllerJobs []CCJob

CloudControllerJobs - array storing a list of CCJobs

type ConfigurationParser added in v0.1.45

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

ConfigurationParser - the parser to handle installation settings file parsing

func NewConfigurationParser added in v0.1.45

func NewConfigurationParser(installationFilePath string) *ConfigurationParser

NewConfigurationParser - constructor for a ConfigurationParser from a json installationsettings file

func (*ConfigurationParser) GetIaaS added in v0.1.45

func (s *ConfigurationParser) GetIaaS() (config IaaSConfiguration, err error)

GetIaaS - get the iaas elements from the installation settings

type DiskProvider added in v0.1.36

type DiskProvider struct {
	Directory string
}

DiskProvider is a storage provider that stores your Docker images on local disk.

func (*DiskProvider) Reader added in v0.1.36

func (d *DiskProvider) Reader(path ...string) (io.ReadCloser, error)

Reader returns an io.ReadCloser for the specified path

func (*DiskProvider) Writer added in v0.1.36

func (d *DiskProvider) Writer(path ...string) (io.WriteCloser, error)

Writer returns an io.WriteCloser for the specified path

type ElasticRuntime

type ElasticRuntime struct {
	JSONFile          string
	SystemsInfo       map[string]SystemDump
	PersistentSystems []SystemDump
	HTTPGateway       HttpGateway
	InstallationName  string
	BackupContext
}

ElasticRuntime contains information about a Pivotal Elastic Runtime deployment

func (*ElasticRuntime) Backup

func (context *ElasticRuntime) Backup() (err error)

Backup performs a backup of a Pivotal Elastic Runtime deployment

func (*ElasticRuntime) ReadAllUserCredentials

func (context *ElasticRuntime) ReadAllUserCredentials() (err error)

ReadAllUserCredentials - get all user creds from the installation json

func (*ElasticRuntime) Restore

func (context *ElasticRuntime) Restore() (err error)

Restore performs a restore of a Pivotal Elastic Runtime deployment

func (*ElasticRuntime) RunDbAction

func (context *ElasticRuntime) RunDbAction(dbInfoList []SystemDump, action int) (err error)

RunDbAction - run a db action dump/import against a list of systemdump types

type ElasticRuntimeBuilder added in v0.1.22

type ElasticRuntimeBuilder struct{}

ElasticRuntimeBuilder -- an object that can build an elastic runtime pre-initialized

func (*ElasticRuntimeBuilder) New added in v0.1.22

func (s *ElasticRuntimeBuilder) New(tileSpec tileregistry.TileSpec) (elasticRuntime tileregistry.Tile, err error)

New -- method to generate an initialized elastic runtime

type IPPasswordParser added in v0.1.45

type IPPasswordParser struct {
	Product   string
	Component string
	Username  string
	// contains filtered or unexported fields
}

IPPasswordParser - parses the passwords out of a installation settings

func (*IPPasswordParser) Parse added in v0.1.45

func (s *IPPasswordParser) Parse(jsonObj InstallationCompareObject) (ip, password string, err error)

Parse - parse a given installation compare object

type IaaSConfiguration added in v0.1.45

type IaaSConfiguration struct {
	SSHPrivateKey string `json:"ssh_private_key"`
}

IaaSConfiguration - a struct to house the IaaSConfiguration block elements from the json

type Infrastructure added in v0.1.45

type Infrastructure struct {
	IaaSConfig IaaSConfiguration `json:"iaas_configuration"`
}

Infrastructure - a struct to house Infrastructure block elements from the json

type InstallationCompareObject

type InstallationCompareObject struct {
	Guid                string
	InstallationVersion string `json:"installation_version"`
	Products            []productCompareObject
	Infrastructure      infrastructure
}

InstallationCompareObject --

func ReadAndUnmarshal

func ReadAndUnmarshal(src io.Reader) (jsonObj InstallationCompareObject, err error)

ReadAndUnmarshal - takes an io.reader and unmarshals its contents into a compare object

type InstallationSettings added in v0.1.45

type InstallationSettings struct {
	Infrastructure Infrastructure
}

InstallationSettings - an object to house installationsettings elements from the json

type MysqlInfo

type MysqlInfo struct {
	SystemInfo
	Database string
}

MysqlInfo - a struct representing a mysql systemdump implementation

func (*MysqlInfo) GetPersistanceBackup

func (s *MysqlInfo) GetPersistanceBackup() (dumper PersistanceBackup, err error)

GetPersistanceBackup - the constructor for a new mysqlinfo object

type NFSBackup

type NFSBackup struct {
	Caller    command.Executer
	RemoteOps remoteOpsInterface
}

NFSBackup - this is a nfs backup object

func NewNFSBackup

func NewNFSBackup(password, ip string) (nfs *NFSBackup, err error)

NewNFSBackup - constructor for an nfsbackup object

func (*NFSBackup) Dump

func (s *NFSBackup) Dump(dest io.Writer) (err error)

Dump - will dump the output of a executed command to the given writer

func (*NFSBackup) Import

func (s *NFSBackup) Import(lfile io.Reader) (err error)

Import - will upload the contents of the given io.reader to the remote execution target and execute the restore command against the uploaded file.

type NfsInfo

type NfsInfo struct {
	SystemInfo
}

NfsInfo - a struct representing a nfs systemdump implementation

func (*NfsInfo) GetPersistanceBackup

func (s *NfsInfo) GetPersistanceBackup() (dumper PersistanceBackup, err error)

GetPersistanceBackup - the constructor for a new nfsinfo object

type OpsManager

type OpsManager struct {
	BackupContext
	Hostname            string
	Username            string
	Password            string
	TempestPassword     string
	DbEncryptionKey     string
	Executer            command.Executer
	LocalExecuter       command.Executer
	SettingsUploader    httpUploader
	AssetsUploader      httpUploader
	SettingsRequestor   httpRequestor
	AssetsRequestor     httpRequestor
	DeploymentDir       string
	OpsmanagerBackupDir string
}

OpsManager contains the location and credentials of a Pivotal Ops Manager instance

func (*OpsManager) Backup

func (context *OpsManager) Backup() (err error)

Backup performs a backup of a Pivotal Ops Manager instance

func (*OpsManager) GetInstallationSettings added in v0.1.25

func (context *OpsManager) GetInstallationSettings() (settings io.Reader, err error)

GetInstallationSettings retrieves all the installation settings from OpsMan and returns them in a buffered reader

func (*OpsManager) Restore

func (context *OpsManager) Restore() (err error)

Restore performs a restore of a Pivotal Ops Manager instance

type OpsManagerBuilder added in v0.1.22

type OpsManagerBuilder struct{}

OpsManagerBuilder - an object that can build ops manager objects

func (*OpsManagerBuilder) New added in v0.1.22

func (s *OpsManagerBuilder) New(tileSpec tileregistry.TileSpec) (opsManager tileregistry.Tile, err error)

New -- builds a new ops manager object pre initialized

type PersistanceBackup

type PersistanceBackup interface {
	Dump(io.Writer) error
	Import(io.Reader) error
}

PersistanceBackup - a struct representing a persistence backup

type PgInfo

type PgInfo struct {
	SystemInfo
	Database string
}

PgInfo - a struct representing a pgres systemdump implementation

func (*PgInfo) GetPersistanceBackup

func (s *PgInfo) GetPersistanceBackup() (dumper PersistanceBackup, err error)

GetPersistanceBackup - the constructor for a new pginfo object

type S3Provider added in v0.1.36

type S3Provider struct {
	S3Domain        string
	BucketName      string
	AccessKeyID     string
	SecretAccessKey string
}

S3Provider is a storage provider that allows backups to be stored to an S3 compatible blobstore

func (*S3Provider) Reader added in v0.1.36

func (s *S3Provider) Reader(path ...string) (io.ReadCloser, error)

Reader for reading from an S3 bucket

func (*S3Provider) Writer added in v0.1.36

func (s *S3Provider) Writer(path ...string) (io.WriteCloser, error)

Writer for writing to an S3 bucket

type StorageProvider added in v0.1.36

type StorageProvider interface {
	Reader(path ...string) (io.ReadCloser, error)
	Writer(path ...string) (io.WriteCloser, error)
}

StorageProvider is responsible for obtaining/managing a reader/writer to a storage type (eg disk/s3)

func NewDiskProvider added in v0.1.36

func NewDiskProvider() StorageProvider

NewDiskProvider creates a new disk storage provider instance

func NewS3Provider added in v0.1.36

func NewS3Provider(domain, key, secret, bucket string) StorageProvider

NewS3Provider creates a new instance of the S3 storage provider

type SystemDump

type SystemDump interface {
	Error() error
	GetPersistanceBackup() (dumper PersistanceBackup, err error)
	// contains filtered or unexported methods
}

SystemDump - definition for a SystemDump interface

type SystemInfo

type SystemInfo struct {
	goutil.GetSet
	Product   string
	Component string
	Identity  string
	Ip        string
	User      string
	Pass      string
	VcapUser  string
	VcapPass  string
}

SystemInfo - a struct representing a base systemdump implementation

func (*SystemInfo) Error

func (s *SystemInfo) Error() (err error)

Error - method making systeminfo implement the error interface

func (*SystemInfo) Get

func (s *SystemInfo) Get(name string) string

Get - a getter for a systeminfo object

func (*SystemInfo) GetPersistanceBackup

func (s *SystemInfo) GetPersistanceBackup() (dumper PersistanceBackup, err error)

GetPersistanceBackup - the constructor for a systeminfo object

func (*SystemInfo) Set

func (s *SystemInfo) Set(name string, val string)

Set - a setter for a systeminfo object

type Tile

type Tile interface {
	Backup() error
	Restore() error
}

Tile is a deployable component that can be backed up

type VMObject

type VMObject struct {
	Job   string
	Index int
}

VMObject - a struct representing a vm

func ReadAndUnmarshalVMObjects

func ReadAndUnmarshalVMObjects(src io.Reader) (jsonObj []VMObject, err error)

ReadAndUnmarshalVMObjects - read the io.reader and unmarshal its contents into an vmobject array

Directories

Path Synopsis
Godeps
_workspace/src/github.com/cloudfoundry-community/go-cfenv
Package cfenv provides information about the current app deployed on Cloud Foundry, including any bound service(s).
Package cfenv provides information about the current app deployed on Cloud Foundry, including any bound service(s).
_workspace/src/github.com/kr/fs
Package fs provides filesystem-related functions.
Package fs provides filesystem-related functions.
_workspace/src/github.com/mitchellh/mapstructure
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
_workspace/src/github.com/onsi/ginkgo
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
Ginkgo is a BDD-style testing framework for Golang The godoc documentation describes Ginkgo's API.
_workspace/src/github.com/onsi/ginkgo/config
Ginkgo accepts a number of configuration options.
Ginkgo accepts a number of configuration options.
_workspace/src/github.com/onsi/ginkgo/ginkgo
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
The Ginkgo CLI The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) You can also learn more by running: ginkgo help Here are some of the more commonly used commands: To install: go install github.com/onsi/ginkgo/ginkgo To run tests: ginkgo To run tests in all subdirectories: ginkgo -r To run tests in particular packages: ginkgo <flags> /path/to/package /path/to/another/package To pass arguments/flags to your tests: ginkgo <flags> <packages> -- <pass-throughs> To run tests in parallel ginkgo -p this will automatically detect the optimal number of nodes to use.
_workspace/src/github.com/onsi/ginkgo/internal/remote
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
_workspace/src/github.com/onsi/ginkgo/reporters
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
Ginkgo's Default Reporter A number of command line flags are available to tweak Ginkgo's default output.
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
_workspace/src/github.com/onsi/gomega/format
Gomega's format package pretty-prints objects.
Gomega's format package pretty-prints objects.
_workspace/src/github.com/onsi/gomega/gbytes
Package gbytes provides a buffer that supports incrementally detecting input.
Package gbytes provides a buffer that supports incrementally detecting input.
_workspace/src/github.com/onsi/gomega/gexec
Package gexec provides support for testing external processes.
Package gexec provides support for testing external processes.
_workspace/src/github.com/onsi/gomega/ghttp
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
_workspace/src/github.com/onsi/gomega/ghttp/protobuf
Package protobuf is a generated protocol buffer package.
Package protobuf is a generated protocol buffer package.
_workspace/src/github.com/onsi/gomega/matchers
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
Gomega matchers This package implements the Gomega matchers and does not typically need to be imported.
_workspace/src/github.com/op/go-logging
Package logging implements a logging infrastructure for Go.
Package logging implements a logging infrastructure for Go.
_workspace/src/github.com/pkg/sftp
Package sftp implements the SSH File Transfer Protocol as described in https://filezilla-project.org/specs/draft-ietf-secsh-filexfer-02.txt
Package sftp implements the SSH File Transfer Protocol as described in https://filezilla-project.org/specs/draft-ietf-secsh-filexfer-02.txt
_workspace/src/github.com/pkg/sftp/examples/buffered-read-benchmark
buffered-read-benchmark benchmarks the peformance of reading from /dev/zero on the server to a []byte on the client via io.Copy.
buffered-read-benchmark benchmarks the peformance of reading from /dev/zero on the server to a []byte on the client via io.Copy.
_workspace/src/github.com/pkg/sftp/examples/buffered-write-benchmark
buffered-write-benchmark benchmarks the peformance of writing a single large []byte on the client to /dev/null on the server via io.Copy.
buffered-write-benchmark benchmarks the peformance of writing a single large []byte on the client to /dev/null on the server via io.Copy.
_workspace/src/github.com/pkg/sftp/examples/streaming-read-benchmark
streaming-read-benchmark benchmarks the peformance of reading from /dev/zero on the server to /dev/null on the client via io.Copy.
streaming-read-benchmark benchmarks the peformance of reading from /dev/zero on the server to /dev/null on the client via io.Copy.
_workspace/src/github.com/pkg/sftp/examples/streaming-write-benchmark
streaming-write-benchmark benchmarks the peformance of writing from /dev/zero on the client to /dev/null on the server via io.Copy.
streaming-write-benchmark benchmarks the peformance of writing from /dev/zero on the client to /dev/null on the server via io.Copy.
_workspace/src/github.com/rlmcpherson/s3gof3r
Package s3gof3r provides fast, parallelized, streaming access to Amazon S3.
Package s3gof3r provides fast, parallelized, streaming access to Amazon S3.
_workspace/src/github.com/rlmcpherson/s3gof3r/gof3r
gof3r is a command-line interface for s3gof3r: fast, concurrent, streaming access to Amazon S3.
gof3r is a command-line interface for s3gof3r: fast, concurrent, streaming access to Amazon S3.
_workspace/src/github.com/technoweenie/multipartstreamer
Package multipartstreamer helps you encode large files in MIME multipart format without reading the entire content into memory.
Package multipartstreamer helps you encode large files in MIME multipart format without reading the entire content into memory.
_workspace/src/golang.org/x/crypto/ssh
Package ssh implements an SSH client and server.
Package ssh implements an SSH client and server.
_workspace/src/golang.org/x/crypto/ssh/agent
Package agent implements a client to an ssh-agent daemon.
Package agent implements a client to an ssh-agent daemon.
_workspace/src/golang.org/x/crypto/ssh/terminal
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
Package terminal provides support functions for dealing with terminals, as commonly found on UNIX systems.
_workspace/src/golang.org/x/crypto/ssh/test
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
This package contains integration tests for the code.google.com/p/go.crypto/ssh package.
_workspace/src/gopkg.in/yaml.v1
Package yaml implements YAML support for the Go language.
Package yaml implements YAML support for the Go language.

Jump to

Keyboard shortcuts

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