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 DynamicMetadataService
- type FileSettingsSource
- type FileSourceOptions
- type HTTPMetadataService
- func (ms HTTPMetadataService) GetInstanceID() (string, error)
- func (ms HTTPMetadataService) GetNetworks() (boshsettings.Networks, error)
- func (ms HTTPMetadataService) GetPublicKey() (string, error)
- func (ms HTTPMetadataService) GetRegistryEndpoint() (string, error)
- func (ms HTTPMetadataService) GetServerName() (string, error)
- func (ms HTTPMetadataService) GetValueAtPath(path string) (string, error)
- func (ms HTTPMetadataService) IsAvailable() bool
- func (ms HTTPMetadataService) Load() error
- type HTTPSourceOptions
- type InstanceMetadataSettingsSource
- func NewInstanceMetadataSettingsSource(metadataHost string, metadataHeaders map[string]string, settingsPath string, ...) *InstanceMetadataSettingsSource
- func NewInstanceMetadataSettingsSourceWithoutRetryDelay(metadataHost string, metadataHeaders map[string]string, settingsPath string, ...) *InstanceMetadataSettingsSource
- type InstanceMetadataSourceOptions
- type MetadataContentsType
- type MetadataService
- func NewConfigDriveMetadataService(resolver DNSResolver, platform boshplatform.Platform, diskPaths []string, ...) MetadataService
- func NewFileMetadataService(metaDataFilePath string, userDataFilePath string, settingsFilePath string, ...) 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) GetMetadataService ¶
func (s ComplexSettingsSource) GetMetadataService() MetadataService
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 DynamicMetadataService ¶
type DynamicMetadataService interface { MetadataService GetValueAtPath(string) (string, error) }
func NewHTTPMetadataService ¶
type FileSettingsSource ¶
type FileSettingsSource struct {
// contains filtered or unexported fields
}
func NewFileSettingsSource ¶
func NewFileSettingsSource( settingsFilePath string, fs boshsys.FileSystem, logger boshlog.Logger, ) *FileSettingsSource
func (*FileSettingsSource) PublicSSHKeyForUsername ¶
func (s *FileSettingsSource) PublicSSHKeyForUsername(string) (string, error)
func (*FileSettingsSource) Settings ¶
func (s *FileSettingsSource) Settings() (boshsettings.Settings, error)
type FileSourceOptions ¶
type HTTPMetadataService ¶
type HTTPMetadataService struct {
// contains filtered or unexported fields
}
func (HTTPMetadataService) GetInstanceID ¶
func (ms HTTPMetadataService) GetInstanceID() (string, error)
func (HTTPMetadataService) GetNetworks ¶
func (ms HTTPMetadataService) GetNetworks() (boshsettings.Networks, error)
func (HTTPMetadataService) GetPublicKey ¶
func (ms HTTPMetadataService) GetPublicKey() (string, error)
func (HTTPMetadataService) GetRegistryEndpoint ¶
func (ms HTTPMetadataService) GetRegistryEndpoint() (string, error)
func (HTTPMetadataService) GetServerName ¶
func (ms HTTPMetadataService) GetServerName() (string, error)
func (HTTPMetadataService) GetValueAtPath ¶
func (ms HTTPMetadataService) GetValueAtPath(path string) (string, error)
func (HTTPMetadataService) IsAvailable ¶
func (ms HTTPMetadataService) IsAvailable() bool
func (HTTPMetadataService) Load ¶
func (ms HTTPMetadataService) Load() error
type HTTPSourceOptions ¶
type InstanceMetadataSettingsSource ¶
type InstanceMetadataSettingsSource struct {
// contains filtered or unexported fields
}
func NewInstanceMetadataSettingsSource ¶
func NewInstanceMetadataSettingsSource( metadataHost string, metadataHeaders map[string]string, settingsPath string, platform boshplatform.Platform, logger boshlog.Logger, ) *InstanceMetadataSettingsSource
func NewInstanceMetadataSettingsSourceWithoutRetryDelay ¶
func NewInstanceMetadataSettingsSourceWithoutRetryDelay( metadataHost string, metadataHeaders map[string]string, settingsPath string, platform boshplatform.Platform, logger boshlog.Logger, ) *InstanceMetadataSettingsSource
func (InstanceMetadataSettingsSource) PublicSSHKeyForUsername ¶
func (s InstanceMetadataSettingsSource) PublicSSHKeyForUsername(string) (string, error)
func (*InstanceMetadataSettingsSource) Settings ¶
func (s *InstanceMetadataSettingsSource) Settings() (boshsettings.Settings, error)
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 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 ¶
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
- file_settings_source.go
- http_metadata_service.go
- http_registry.go
- instance_metadata_settings_source.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.