package examples

import "github.com/vmware/govmomi/examples"

Index

Functions

func NewClient

func NewClient(ctx context.Context) (*vim25.Client, error)

NewClient creates a vim25.Client for use in the examples

func Run

func Run(f func(context.Context, *vim25.Client) error)

Run calls f with Client create from the -url flag if provided, otherwise runs the example against vcsim.

Source Files

examples.go

Directories

PathSynopsis
examples/alarms
examples/datastores
examples/events
examples/hosts
examples/networks
examples/perfmanager
examples/tasks
examples/virtualmachines
Version
v0.51.0 (latest)
Published
May 23, 2025
Platform
linux/amd64
Imports
11 packages
Last checked
1 week ago

Tools for package owners.