cmd

package
v0.0.0-...-e011bf3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2016 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GC         *http.Client
	Gceproject string
	Topic      string
	KeyPath    string
	Loglvl     string
	Logfmt     string
)
View Source
var RootCmd = &cobra.Command{
	Use:   "pubbing",
	Short: "Google PubSub test framework",
	Long:  ``,

	Run: func(cmd *cobra.Command, args []string) { log.Infof("pubbing called without command") },
}

This represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GCEClientInit

func GCEClientInit(ctx *context.Context, project string) *pubsub.Client

GCEClientInit uses Google's host FS searching functionality to find auth tokens if they exist. eg: GCE VMs, Authenticated Developers

func GCS

func GCS(projectid string) cloudstorage.GoogleOAuthClient

func JWTClientInit

func JWTClientInit(ctx *context.Context) *pubsub.Client

JWTClientInit reads in a service account JSON token and creates an oauth token for communicating with GCE.

Types

This section is empty.

Jump to

Keyboard shortcuts

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