Documentation ¶
Index ¶
- func NewMultiSettingsSource(sources ...boshsettings.Source) (boshsettings.Source, error)
- type CDROMSettingsSource
- type CDROMSourceOptions
- type ComplexSettingsSource
- type ConfigDriveSettingsSource
- type ConfigDriveSourceOptions
- type DNSResolver
- type DigDNSResolver
- type FileSourceOptions
- type HTTPSourceOptions
- type MetadataContentsType
- type MetadataService
- func NewConfigDriveMetadataService(resolver DNSResolver, platform boshplatform.Platform, diskPaths []string, ...) MetadataService
- func NewFileMetadataService(metaDataFilePath string, userDataFilePath string, settingsFilePath string, ...) MetadataService
- func NewHTTPMetadataService(metadataHost string, resolver DNSResolver, platform boshplat.Platform, ...) MetadataService
- func NewMultiSourceMetadataService(services ...MetadataService) MetadataService
- type MetadataServiceOptions
- type MetadataServiceProvider
- type MultiSettingsSource
- type MultiSourceMetadataService
- func (ms *MultiSourceMetadataService) GetInstanceID() (string, error)
- func (ms *MultiSourceMetadataService) GetNetworks() (boshsettings.Networks, error)
- func (ms *MultiSourceMetadataService) GetPublicKey() (string, error)
- func (ms *MultiSourceMetadataService) GetRegistryEndpoint() (string, error)
- func (ms *MultiSourceMetadataService) GetServerName() (string, error)
- func (ms *MultiSourceMetadataService) IsAvailable() bool
- type Options
- type PublicKeyContent
- type PublicKeyType
- type Registry
- type RegistryProvider
- type SettingsOptions
- type SettingsSourceFactory
- type SourceOptions
- type SourceOptionsSlice
- type UserDataContentsType
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 ¶
func (s *CDROMSettingsSource) Settings() (boshsettings.Settings, error)
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 ¶
func (s ComplexSettingsSource) Settings() (boshsettings.Settings, error)
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 ¶
func (s *ConfigDriveSettingsSource) Settings() (boshsettings.Settings, error)
type DNSResolver ¶
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 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 ¶
func (s *MultiSettingsSource) Settings() (boshsettings.Settings, error)
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 (ms *MultiSourceMetadataService) GetNetworks() (boshsettings.Networks, error)
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 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 ¶
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 ¶
func (f SettingsSourceFactory) New() (boshsettings.Source, error)
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 }
Source Files ¶
- cdrom_settings_source.go
- complex_settings_source.go
- config_drive_metadata_service.go
- config_drive_settings_source.go
- dig_dns_resolver.go
- dns_resolver_interface.go
- file_metadata_service.go
- file_registry.go
- http_metadata_service.go
- http_registry.go
- metadata_service_interface.go
- multi_settings_source.go
- multi_source_metadata_service.go
- registry_endpoint_resolver.go
- registry_interface.go
- registry_provider.go
- settings_source_factory.go
Click to show internal directories.
Click to hide internal directories.