Documentation
¶
Index ¶
- Constants
- func GetNodeAnnotations(ctx context.Context) (map[string]string, error)
- func Loader(ctx context.Context, config providers.Config) (providers.Provider, *httperr.Error)
- func LoaderSim(_ context.Context, cfg providers.Config) (providers.Provider, *httperr.Error)
- func NamedLoader() (string, providers.Loader)
- func NamedLoaderSim() (string, providers.Loader)
- func NewSim(clientFactory ClientFactory, trimTiers int) *simProvider
- type Client
- type ClientFactory
- type InstanceIterator
- type Provider
- func (p *Provider) GenerateTopologyConfig(ctx context.Context, pageSize *int, instances []topology.ComputeInstances) (*topology.Vertex, *httperr.Error)
- func (p *Provider) GetInstancesRegions(ctx context.Context, nodes []string) (map[string]string, error)
- func (p *Provider) Instances2NodeMap(ctx context.Context, nodes []string) (map[string]string, error)
Constants ¶
View Source
const ( IMDSURL = "http://metadata.google.internal/computeMetadata/v1" IMDSInstanceURL = IMDSURL + "/instance/id" IMDSRegionURL = IMDSURL + "/instance/zone" IMDSHeaderKey = "Metadata-Flavor" IMDSHeaderVal = "Google" IMDSHeader = IMDSHeaderKey + ": " + IMDSHeaderVal )
View Source
const NAME = "gcp"
View Source
const (
NAME_SIM = "gcp-sim"
)
Variables ¶
This section is empty.
Functions ¶
func NamedLoader ¶
func NamedLoaderSim ¶
func NewSim ¶
func NewSim(clientFactory ClientFactory, trimTiers int) *simProvider
Types ¶
type Client ¶
type Client interface {
ProjectID() string
Instances(ctx context.Context, req *computepb.ListInstancesRequest, opts ...gax.CallOption) (InstanceIterator, string)
PageSize() *uint32
}
type ClientFactory ¶
type InstanceIterator ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func New ¶
func New(clientFactory ClientFactory, trimTiers int) *Provider
func (*Provider) GenerateTopologyConfig ¶
Click to show internal directories.
Click to hide internal directories.