infrastructure

package
v0.0.0-...-103f5a4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMultiSettingsSource

func NewMultiSettingsSource(sources ...boshsettings.Source) (boshsettings.Source, error)

Types

type CDROMSettingsSource

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

func NewCDROMSettingsSource

func NewCDROMSettingsSource(
	settingsFileName string,
	platform boshplatform.Platform,
	logger boshlog.Logger,
) *CDROMSettingsSource

func (CDROMSettingsSource) PublicSSHKeyForUsername

func (s CDROMSettingsSource) PublicSSHKeyForUsername(string) (string, error)

func (*CDROMSettingsSource) Settings

type CDROMSourceOptions

type CDROMSourceOptions struct {
	FileName string
}

type ComplexSettingsSource

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

func NewComplexSettingsSource

func NewComplexSettingsSource(
	metadataService MetadataService,
	registryProvider RegistryProvider,
	logger boshlog.Logger,
) ComplexSettingsSource

func (ComplexSettingsSource) PublicSSHKeyForUsername

func (s ComplexSettingsSource) PublicSSHKeyForUsername(string) (string, error)

func (ComplexSettingsSource) Settings

type ConfigDriveSettingsSource

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

func NewConfigDriveSettingsSource

func NewConfigDriveSettingsSource(
	diskPaths []string,
	metadataPath string,
	settingsPath string,
	platform boshplatform.Platform,
	logger boshlog.Logger,
) *ConfigDriveSettingsSource

func (*ConfigDriveSettingsSource) PublicSSHKeyForUsername

func (s *ConfigDriveSettingsSource) PublicSSHKeyForUsername(string) (string, error)

func (*ConfigDriveSettingsSource) Settings

type ConfigDriveSourceOptions

type ConfigDriveSourceOptions struct {
	DiskPaths []string

	MetaDataPath string
	UserDataPath string

	SettingsPath string
}

type DNSResolver

type DNSResolver interface {
	LookupHost(dnsServers []string, endpoint string) (string, error)
}

func NewRegistryEndpointResolver

func NewRegistryEndpointResolver(resolver DNSResolver) DNSResolver

type DigDNSResolver

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

func NewDigDNSResolver

func NewDigDNSResolver(runner boshsys.CmdRunner, logger boshlog.Logger) DigDNSResolver

func (DigDNSResolver) LookupHost

func (res DigDNSResolver) LookupHost(dnsServers []string, host string) (string, error)

type FileSourceOptions

type FileSourceOptions struct {
	MetaDataPath string
	UserDataPath string

	SettingsPath string
}

type HTTPSourceOptions

type HTTPSourceOptions struct {
	URI string
}

type MetadataContentsType

type MetadataContentsType struct {
	PublicKeys map[string]PublicKeyType `json:"public-keys"`
	InstanceID string                   `json:"instance-id"` // todo remove
}

type MetadataService

type MetadataService interface {
	IsAvailable() bool
	GetPublicKey() (string, error)
	GetInstanceID() (string, error)
	GetServerName() (string, error)
	GetRegistryEndpoint() (string, error)
	GetNetworks() (boshsettings.Networks, error)
}

func NewConfigDriveMetadataService

func NewConfigDriveMetadataService(
	resolver DNSResolver,
	platform boshplatform.Platform,
	diskPaths []string,
	metaDataFilePath string,
	userDataFilePath string,
	logger boshlog.Logger,
) MetadataService

func NewFileMetadataService

func NewFileMetadataService(
	metaDataFilePath string,
	userDataFilePath string,
	settingsFilePath string,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) MetadataService

func NewHTTPMetadataService

func NewHTTPMetadataService(
	metadataHost string,
	resolver DNSResolver,
	platform boshplat.Platform,
	logger boshlog.Logger,
) MetadataService

func NewMultiSourceMetadataService

func NewMultiSourceMetadataService(services ...MetadataService) MetadataService

type MetadataServiceOptions

type MetadataServiceOptions struct {
	UseConfigDrive bool
}

type MetadataServiceProvider

type MetadataServiceProvider interface {
	Get() MetadataService
}

type MultiSettingsSource

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

func (*MultiSettingsSource) PublicSSHKeyForUsername

func (s *MultiSettingsSource) PublicSSHKeyForUsername(username string) (string, error)

func (*MultiSettingsSource) Settings

type MultiSourceMetadataService

type MultiSourceMetadataService struct {
	Services []MetadataService
	// contains filtered or unexported fields
}

func (*MultiSourceMetadataService) GetInstanceID

func (ms *MultiSourceMetadataService) GetInstanceID() (string, error)

func (*MultiSourceMetadataService) GetNetworks

func (*MultiSourceMetadataService) GetPublicKey

func (ms *MultiSourceMetadataService) GetPublicKey() (string, error)

func (*MultiSourceMetadataService) GetRegistryEndpoint

func (ms *MultiSourceMetadataService) GetRegistryEndpoint() (string, error)

func (*MultiSourceMetadataService) GetServerName

func (ms *MultiSourceMetadataService) GetServerName() (string, error)

func (*MultiSourceMetadataService) IsAvailable

func (ms *MultiSourceMetadataService) IsAvailable() bool

type Options

type Options struct {
	Settings SettingsOptions
}

type PublicKeyContent

type PublicKeyContent struct {
	PublicKey string `json:"public_key"`
}

type PublicKeyType

type PublicKeyType map[string]string

type Registry

type Registry interface {
	GetSettings() (boshsettings.Settings, error)
}

func NewFileRegistry

func NewFileRegistry(registryFilePath string, fs boshsys.FileSystem) Registry

func NewHTTPRegistry

func NewHTTPRegistry(
	metadataService MetadataService,
	platform boshplat.Platform,
	useServerNameAsID bool,
) Registry

type RegistryProvider

type RegistryProvider interface {
	GetRegistry() (Registry, error)
}

func NewRegistryProvider

func NewRegistryProvider(
	metadataService MetadataService,
	platform boshplat.Platform,
	useServerName bool,
	fs boshsys.FileSystem,
	logger boshlog.Logger,
) RegistryProvider

type SettingsOptions

type SettingsOptions struct {
	Sources       SourceOptionsSlice
	UseServerName bool
	UseRegistry   bool
}

type SettingsSourceFactory

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

func NewSettingsSourceFactory

func NewSettingsSourceFactory(
	options SettingsOptions,
	platform boshplat.Platform,
	logger boshlog.Logger,
) SettingsSourceFactory

func (SettingsSourceFactory) New

type SourceOptions

type SourceOptions interface {
	// contains filtered or unexported methods
}

type SourceOptionsSlice

type SourceOptionsSlice []SourceOptions

SourceOptionsSlice is used for unmarshalling different source types

func (*SourceOptionsSlice) UnmarshalJSON

func (s *SourceOptionsSlice) UnmarshalJSON(data []byte) error

type UserDataContentsType

type UserDataContentsType struct {
	Registry struct {
		Endpoint string
	}
	Server struct {
		Name string // Name given by CPI e.g. vm-384sd4-r7re9e...
	}
	DNS struct {
		Nameserver []string
	}
	Networks boshsettings.Networks
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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