gcp

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata interface {
	OnGCE() bool
	ProjectID() (string, error)
	Zone() (string, error)
	Hostname() (string, error)
	InstanceAttributeValue(attr string) (string, error)
	InstanceID() (string, error)
	InstanceName() (string, error)
	Get(suffix string) (string, error)
}

type MetadataImpl

type MetadataImpl struct{}

func (*MetadataImpl) Get

func (m *MetadataImpl) Get(suffix string) (string, error)

func (*MetadataImpl) Hostname

func (m *MetadataImpl) Hostname() (string, error)

func (*MetadataImpl) InstanceAttributeValue

func (m *MetadataImpl) InstanceAttributeValue(attr string) (string, error)

func (*MetadataImpl) InstanceID

func (m *MetadataImpl) InstanceID() (string, error)

func (*MetadataImpl) InstanceName

func (m *MetadataImpl) InstanceName() (string, error)

func (*MetadataImpl) OnGCE

func (m *MetadataImpl) OnGCE() bool

func (*MetadataImpl) ProjectID

func (m *MetadataImpl) ProjectID() (string, error)

func (*MetadataImpl) Zone

func (m *MetadataImpl) Zone() (string, error)

type MockMetadata

type MockMetadata struct {
	mock.Mock
}

func (*MockMetadata) Get

func (m *MockMetadata) Get(suffix string) (string, error)

func (*MockMetadata) Hostname

func (m *MockMetadata) Hostname() (string, error)

func (*MockMetadata) InstanceAttributeValue

func (m *MockMetadata) InstanceAttributeValue(attr string) (string, error)

func (*MockMetadata) InstanceID

func (m *MockMetadata) InstanceID() (string, error)

func (*MockMetadata) InstanceName

func (m *MockMetadata) InstanceName() (string, error)

func (*MockMetadata) OnGCE

func (m *MockMetadata) OnGCE() bool

func (*MockMetadata) ProjectID

func (m *MockMetadata) ProjectID() (string, error)

func (*MockMetadata) Zone

func (m *MockMetadata) Zone() (string, error)

Directories

Path Synopsis
Package gce provides a detector that loads resource information from the GCE metatdata
Package gce provides a detector that loads resource information from the GCE metatdata

Jump to

Keyboard shortcuts

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