gcp

package
v0.0.0-...-cfe5bfc Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const NAME = "gcp"

Variables

This section is empty.

Functions

func Loader

func Loader(ctx context.Context, config providers.Config) (providers.Provider, error)

func NamedLoader

func NamedLoader() (string, providers.Loader)

Types

type Client

type Client struct {
	Zones     ZonesClient
	Instances InstancesClient
}

type ClientFactory

type ClientFactory func() (*Client, error)

type InstanceInfo

type InstanceInfo struct {
	// contains filtered or unexported fields
}

type InstanceTopology

type InstanceTopology struct {
	// contains filtered or unexported fields
}

type InstancesClient

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

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func New

func New(clientFactory ClientFactory) (*Provider, error)

func (*Provider) GenerateTopologyConfig

func (p *Provider) GenerateTopologyConfig(ctx context.Context, _ *int, instances []topology.ComputeInstances) (*topology.Vertex, error)

func (*Provider) GetComputeInstancesRegion

func (p *Provider) GetComputeInstancesRegion() (string, error)

GetComputeInstancesRegion implements slurm.instanceMapper

func (*Provider) GetNodeInstance

func (p *Provider) GetNodeInstance(node *v1.Node) (string, error)

GetNodeInstance implements k8s.k8sNodeInfo

func (*Provider) GetNodeRegion

func (p *Provider) GetNodeRegion(node *v1.Node) (string, error)

GetNodeRegion implements k8s.k8sNodeInfo

func (*Provider) Instances2NodeMap

func (p *Provider) Instances2NodeMap(ctx context.Context, nodes []string) (map[string]string, error)

Instances2NodeMap implements slurm.instanceMapper

type ZonesClient

type ZonesClient interface {
	List(ctx context.Context, req *computepb.ListZonesRequest, opts ...gax.CallOption) *compute_v1.ZoneIterator
}

Jump to

Keyboard shortcuts

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