Documentation ¶
Index ¶
- Constants
- type Blobstore
- type BoshEnv
- type CertKeyPair
- type DNSRecords
- type DefaultNetworkResolver
- type DiskAssociation
- type DiskAssociations
- type DiskSettings
- type Disks
- type Env
- func (e Env) GetAuthorizedKeys() []string
- func (e Env) GetKeepRootPassword() bool
- func (e Env) GetParallel() *int
- func (e Env) GetPassword() string
- func (e Env) GetRemoveDevTools() bool
- func (e Env) GetRemoveStaticLibraries() bool
- func (e Env) GetSwapSizeInBytes() *uint64
- func (e Env) IsNATSMutualTLSEnabled() bool
- type IPv6
- type ISCSISettings
- type JobDir
- type MBus
- type Network
- type NetworkType
- type Networks
- func (n Networks) DefaultIP() (ip string, found bool)
- func (n Networks) DefaultNetworkFor(category string) (Network, bool)
- func (n Networks) HasInterfaceAlias() bool
- func (n Networks) IPs() (ips []string)
- func (n Networks) IsPreconfigured() bool
- func (n Networks) NetworkForMac(mac string) (Network, bool)
- type Route
- type Routes
- type Service
- type Settings
- func (s Settings) EphemeralDiskSettings() DiskSettings
- func (s Settings) GetBlobstore() Blobstore
- func (s Settings) GetMbusURL() string
- func (s Settings) GetNtpServers() []string
- func (s Settings) PersistentDiskSettings(diskID string) (DiskSettings, bool)
- func (s Settings) PersistentDiskSettingsFromHint(diskID string, diskHint interface{}) DiskSettings
- func (s Settings) RawEphemeralDiskSettings() (devices []DiskSettings)
- type Source
- type UpdateSettings
- type VM
Constants ¶
View Source
const ( RootUsername = "root" VCAPUsername = "vcap" AdminGroup = "admin" SudoersGroup = "bosh_sudoers" SshersGroup = "bosh_sshers" EphemeralUserPrefix = "bosh_" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoshEnv ¶
type BoshEnv struct { Password string `json:"password"` KeepRootPassword bool `json:"keep_root_password"` RemoveDevTools bool `json:"remove_dev_tools"` RemoveStaticLibraries bool `json:"remove_static_libraries"` AuthorizedKeys []string `json:"authorized_keys"` SwapSizeInMB *uint64 `json:"swap_size"` Mbus MBus `json:"mbus"` IPv6 IPv6 `json:"ipv6"` JobDir JobDir `json:"job_dir"` Blobstores []Blobstore `json:"blobstores"` NTP []string `json:"ntp"` Parallel *int `json:"parallel"` }
type CertKeyPair ¶
type DNSRecords ¶
type DefaultNetworkResolver ¶
type DiskAssociation ¶
type DiskAssociations ¶
type DiskAssociations []DiskAssociation
type DiskSettings ¶
type Disks ¶
type Disks struct { // e.g "/dev/sda", "1" System string `json:"system"` // Older CPIs returned disk settings as string // e.g "/dev/sdb", "2" // Newer CPIs will populate it in a hash // e.g {"path" => "/dev/sdc", "volume_id" => "3"} // {"lun" => "0", "host_device_id" => "{host-device-id}"} Ephemeral interface{} `json:"ephemeral"` // Older CPIs returned disk settings as strings // e.g {"disk-3845-43758-7243-38754" => "/dev/sdc"} // {"disk-3845-43758-7243-38754" => "3"} // Newer CPIs will populate it in a hash: // e.g {"disk-3845-43758-7243-38754" => {"path" => "/dev/sdc"}} // {"disk-3845-43758-7243-38754" => {"volume_id" => "3"}} // {"disk-3845-43758-7243-38754" => {"lun" => "0", "host_device_id" => "{host-device-id}"}} Persistent map[string]interface{} `json:"persistent"` RawEphemeral []DiskSettings `json:"raw_ephemeral"` }
type Env ¶
type Env struct { Bosh BoshEnv `json:"bosh"` PersistentDiskFS disk.FileSystemType `json:"persistent_disk_fs"` PersistentDiskMountOptions []string `json:"persistent_disk_mount_options"` PersistentDiskPartitioner string `json:"persistent_disk_partitioner"` }
func (Env) GetAuthorizedKeys ¶
func (Env) GetKeepRootPassword ¶
func (Env) GetParallel ¶
func (Env) GetPassword ¶
func (Env) GetRemoveDevTools ¶
func (Env) GetRemoveStaticLibraries ¶
func (Env) GetSwapSizeInBytes ¶
func (Env) IsNATSMutualTLSEnabled ¶
type ISCSISettings ¶
type MBus ¶
type MBus struct { Cert CertKeyPair `json:"cert"` URLs []string `json:"urls"` }
type Network ¶
type Network struct { Type NetworkType `json:"type"` IP string `json:"ip"` Netmask string `json:"netmask"` Gateway string `json:"gateway"` Resolved bool `json:"resolved"` // was resolved via DHCP UseDHCP bool `json:"use_dhcp"` Default []string `json:"default"` DNS []string `json:"dns"` Mac string `json:"mac"` Preconfigured bool `json:"preconfigured"` Routes Routes `json:"routes,omitempty"` Alias string `json:"alias,omitempty"` }
func (Network) IsDefaultFor ¶
type NetworkType ¶
type NetworkType string
const ( NetworkTypeDynamic NetworkType = "dynamic" NetworkTypeVIP NetworkType = "vip" )
type Networks ¶
func (Networks) DefaultNetworkFor ¶
func (Networks) HasInterfaceAlias ¶
func (Networks) IsPreconfigured ¶
type Service ¶
type Service interface { LoadSettings() error // GetSettings does not return error because without settings Agent cannot start. GetSettings() Settings GetPersistentDiskSettings(diskCID string) (DiskSettings, error) GetAllPersistentDiskSettings() (map[string]DiskSettings, error) SavePersistentDiskSettings(DiskSettings) error RemovePersistentDiskSettings(string) error PublicSSHKeyForUsername(string) (string, error) InvalidateSettings() error }
func NewService ¶
func NewService( fs boshsys.FileSystem, settingsPath string, persistentDiskSettingsPath string, settingsSource Source, defaultNetworkResolver DefaultNetworkResolver, logger boshlog.Logger, ) Service
type Settings ¶
type Settings struct { AgentID string `json:"agent_id"` Blobstore Blobstore `json:"blobstore"` Disks Disks `json:"disks"` Env Env `json:"env"` Networks Networks `json:"networks"` NTP []string `json:"ntp"` Mbus string `json:"mbus"` VM VM `json:"vm"` }
func (Settings) EphemeralDiskSettings ¶
func (s Settings) EphemeralDiskSettings() DiskSettings
func (Settings) GetBlobstore ¶
func (Settings) GetMbusURL ¶
func (Settings) GetNtpServers ¶
func (Settings) PersistentDiskSettings ¶
func (s Settings) PersistentDiskSettings(diskID string) (DiskSettings, bool)
func (Settings) PersistentDiskSettingsFromHint ¶
func (s Settings) PersistentDiskSettingsFromHint(diskID string, diskHint interface{}) DiskSettings
func (Settings) RawEphemeralDiskSettings ¶
func (s Settings) RawEphemeralDiskSettings() (devices []DiskSettings)
type UpdateSettings ¶
type UpdateSettings struct { DiskAssociations DiskAssociations `json:"disk_associations"` TrustedCerts string `json:"trusted_certs"` }
Click to show internal directories.
Click to hide internal directories.