gcemetadata

package
v0.0.0-...-82d4bb3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package gcemetadata provides basic utilities around configuring the fake GCE Metadata Server component for integration testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Cluster to be used in a multicluster environment
	Cluster cluster.Cluster
}

Config defines the options for creating an fake GCE Metadata Server component.

type Instance

type Instance interface {
	// Address is the IP Address of the service provided by the fake GCE
	// Metadata Server.
	Address() string
	// Address is the IP Address of the service provided by the fake GCE
	// Metadata Server to be used for "VM" instances
	AddressVM() string
}

Instance represents a deployed GCE Metadata Server app instance.

func New

func New(ctx resource.Context, c Config) (i Instance, err error)

New returns a new instance of stackdriver.

func NewOrFail

func NewOrFail(t test.Failer, ctx resource.Context, c Config) Instance

NewOrFail returns a new GCE Metadata Server instance or fails test.

Jump to

Keyboard shortcuts

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