Documentation ¶
Index ¶
- Constants
- func NewDummyPlatform(collector boshstats.Collector, fs boshsys.FileSystem, ...) *dummyPlatform
- func NewLinuxPlatform(fs boshsys.FileSystem, cmdRunner boshsys.CmdRunner, ...) (platform *linux)
- func NewProvider(logger boshlog.Logger, dirProvider boshdirs.Provider, options ProviderOptions) (p provider)
- type LinuxOptions
- type Platform
- type ProviderOptions
Constants ¶
View Source
const ( ArpIterations = 20 ArpIterationDelay = 5 * time.Second ArpInterfaceCheckDelay = 100 * time.Millisecond )
View Source
const (
SigarStatsCollectionInterval = 10 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func NewDummyPlatform ¶
func NewLinuxPlatform ¶
func NewLinuxPlatform( fs boshsys.FileSystem, cmdRunner boshsys.CmdRunner, collector boshstats.Collector, compressor boshcmd.Compressor, copier boshcmd.Copier, dirProvider boshdirs.Provider, vitalsService boshvitals.Service, cdutil boshdevutil.DeviceUtil, diskManager boshdisk.Manager, netManager boshnet.Manager, diskScanDuration time.Duration, options LinuxOptions, logger boshlog.Logger, ) (platform *linux)
func NewProvider ¶
func NewProvider(logger boshlog.Logger, dirProvider boshdirs.Provider, options ProviderOptions) (p provider)
Types ¶
type LinuxOptions ¶
type LinuxOptions struct { // When set to true loop back device // is not going to be overlayed over /tmp to limit /tmp dir size UseDefaultTmpDir bool // When set to true persistent disk will be assumed to be pre-formatted; // otherwise agent will partition and format it right before mounting UsePreformattedPersistentDisk bool // When set to true persistent disk will be mounted as a bind-mount BindMountPersistentDisk bool // When set to true and no ephemeral disk is mounted, the agent will create // a partition on the same device as the root partition to use as the // ephemeral disk CreatePartitionIfNoEphemeralDisk bool }
type Platform ¶
type Platform interface { GetFs() boshsys.FileSystem GetRunner() boshsys.CmdRunner GetCompressor() boshcmd.Compressor GetCopier() boshcmd.Copier GetDirProvider() boshdir.Provider GetVitalsService() boshvitals.Service GetDevicePathResolver() (devicePathResolver boshdpresolv.DevicePathResolver) SetDevicePathResolver(devicePathResolver boshdpresolv.DevicePathResolver) error // User management CreateUser(username, password, basePath string) (err error) AddUserToGroups(username string, groups []string) (err error) DeleteEphemeralUsersMatching(regex string) (err error) // Bootstrap functionality SetupSSH(publicKey, username string) (err error) SetUserPassword(user, encryptedPwd string) (err error) SetupHostname(hostname string) (err error) SetupDhcp(networks boshsettings.Networks) (err error) SetupManualNetworking(networks boshsettings.Networks) (err error) SetupLogrotate(groupName, basePath, size string) (err error) SetTimeWithNtpServers(servers []string) (err error) SetupEphemeralDiskWithPath(devicePath string) (err error) SetupDataDir() (err error) SetupTmpDir() (err error) SetupMonitUser() (err error) StartMonit() (err error) SetupRuntimeConfiguration() (err error) // Disk management MountPersistentDisk(diskSettings boshsettings.DiskSettings, mountPoint string) error UnmountPersistentDisk(diskSettings boshsettings.DiskSettings) (didUnmount bool, err error) MigratePersistentDisk(fromMountPoint, toMountPoint string) (err error) NormalizeDiskPath(diskSettings boshsettings.DiskSettings) string IsMountPoint(path string) (result bool, err error) IsPersistentDiskMounted(diskSettings boshsettings.DiskSettings) (result bool, err error) GetFileContentsFromCDROM(filePath string) (contents []byte, err error) GetFilesContentsFromDisk(diskPath string, fileNames []string) (contents [][]byte, err error) // Network misc PrepareForNetworkingChange() error GetDefaultNetwork() (boshsettings.Network, error) // Additional monit management GetMonitCredentials() (username, password string, err error) }
type ProviderOptions ¶
type ProviderOptions struct {
Linux LinuxOptions
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.