vsphere

package
v0.0.0-...-368d59b Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package vsphere holds utilities for bootstrapping a vSphere API client from the metadata injected by the VSphereSource. Within a receive adapter, users can write:

client, err := vsphere.New(ctx)

This is modeled after the Bindings pattern.

Index

Constants

View Source
const (
	VolumeName = "vsphere-binding"
	MountPath  = "/var/bindings/vsphere" // filepath.Join isn't const.
)

Variables

This section is empty.

Functions

func Address

func Address(ctx context.Context) (string, error)

func New

func New(ctx context.Context) (*govmomi.Client, error)

func NewAdapter

func NewAdapter(ctx context.Context, processed adapter.EnvConfigAccessor, ceClient cloudevents.Client) adapter.Adapter

func NewEnvConfig

func NewEnvConfig() adapter.EnvConfigAccessor

func NewREST

func NewREST(ctx context.Context) (*rest.Client, error)

func ReadKey

func ReadKey(key string) (string, error)

ReadKey may be used to read keys from the secret.

Types

type EnvConfig

type EnvConfig struct {
	Insecure bool   `envconfig:"GOVC_INSECURE" default:"false"`
	Address  string `envconfig:"GOVC_URL" required:"true"`
}

Jump to

Keyboard shortcuts

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