compute

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListInstances

func ListInstances(c context.Context, api ListInstancesAPI, req *computepb.ListInstancesRequest, opts ...gax.CallOption) *compute.InstanceIterator

ListInstances retrieves an aggregated list of instances Inputs:

c is the context of the method call.
api is the interface that defines the method call.
req defines the request arguments to the service call.
opts is the options for the service call.

Output:

Remote call client.
A InstanceIterator object containing the result of the service call.

func RunListInstances

Retrieves an aggregated list of instances

Types

type ListInstancesAPI

type ListInstancesAPI interface {
	List(
		ctx context.Context,
		req *computepb.ListInstancesRequest,
		opts ...gax.CallOption) *compute.InstanceIterator
}

ListInstancesAPI defines the interface for the ListInstances function. We use this interface to test the function using a mocked service.

Jump to

Keyboard shortcuts

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