Documentation
¶
Index ¶
- func PingServer(instance *Instance) error
- type Instance
- type InstanceInformer
- type LocalInstanceCreator
- type LocalInstanceRepository
- type LocalRepository
- func (repo *LocalRepository) AllInstances() ([]*Instance, []error)
- func (repo *LocalRepository) AllInstancesVerbose() ([]*Instance, []error)
- func (repo *LocalRepository) Bind(instanceID string, bindingID string) (broker.InstanceCredentials, error)
- func (repo *LocalRepository) Delete(instanceID string) error
- func (repo *LocalRepository) EnsureDirectoriesExist(instance *Instance) error
- func (repo *LocalRepository) FindByID(instanceID string) (*Instance, error)
- func (repo *LocalRepository) InstanceBaseDir(instanceID string) string
- func (repo *LocalRepository) InstanceConfigPath(instanceID string) string
- func (repo *LocalRepository) InstanceCount() (int, []error)
- func (repo *LocalRepository) InstanceDataDir(instanceID string) string
- func (repo *LocalRepository) InstanceExists(instanceID string) (bool, error)
- func (repo *LocalRepository) InstanceLogDir(instanceID string) string
- func (repo *LocalRepository) InstanceLogFilePath(instanceID string) string
- func (repo *LocalRepository) InstancePid(instanceID string) (pid int, err error)
- func (repo *LocalRepository) InstancePidFilePath(instanceID string) string
- func (repo *LocalRepository) Lock(instance *Instance) error
- func (repo *LocalRepository) Setup(instance *Instance) error
- func (repo *LocalRepository) Unbind(instanceID string, bindingID string) error
- func (repo *LocalRepository) Unlock(instance *Instance) error
- func (repo *LocalRepository) WriteConfigFile(instance *Instance) error
- type OSProcessController
- func (controller *OSProcessController) EnsureRunning(instance *Instance, ...) error
- func (controller *OSProcessController) Kill(instance *Instance) error
- func (controller *OSProcessController) StartAndWaitUntilReady(instance *Instance, configPath, instanceDataDir, logfilePath string, ...) error
- func (controller *OSProcessController) StartAndWaitUntilReadyWithConfig(instance *Instance, instanceCommandArgs []string, timeout time.Duration) error
- type PingServerFunc
- type ProcessChecker
- type ProcessController
- type ProcessKiller
- type WaitUntilConnectableFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PingServer ¶
Types ¶
type InstanceInformer ¶
type LocalInstanceCreator ¶
type LocalInstanceCreator struct { LocalInstanceRepository FindFreePort func() (int, error) ProcessController ProcessController RedisConfiguration brokerconfig.ServiceConfiguration }
func (*LocalInstanceCreator) Create ¶
func (localInstanceCreator *LocalInstanceCreator) Create(instanceID string) error
func (*LocalInstanceCreator) Destroy ¶
func (localInstanceCreator *LocalInstanceCreator) Destroy(instanceID string) error
type LocalInstanceRepository ¶
type LocalInstanceRepository interface { FindByID(instanceID string) (*Instance, error) InstanceExists(instanceID string) (bool, error) Setup(instance *Instance) error Delete(instanceID string) error InstanceDataDir(instanceID string) string InstanceConfigPath(instanceID string) string InstanceLogFilePath(instanceID string) string InstancePidFilePath(instanceID string) string InstanceCount() (int, []error) Lock(instance *Instance) error Unlock(instance *Instance) error }
type LocalRepository ¶
type LocalRepository struct { RedisConf brokerconfig.ServiceConfiguration Logger lager.Logger }
func NewLocalRepository ¶
func NewLocalRepository(redisConf brokerconfig.ServiceConfiguration, logger lager.Logger) *LocalRepository
func (*LocalRepository) AllInstances ¶
func (repo *LocalRepository) AllInstances() ([]*Instance, []error)
func (*LocalRepository) AllInstancesVerbose ¶
func (repo *LocalRepository) AllInstancesVerbose() ([]*Instance, []error)
func (*LocalRepository) Bind ¶
func (repo *LocalRepository) Bind(instanceID string, bindingID string) (broker.InstanceCredentials, error)
func (*LocalRepository) Delete ¶
func (repo *LocalRepository) Delete(instanceID string) error
func (*LocalRepository) EnsureDirectoriesExist ¶
func (repo *LocalRepository) EnsureDirectoriesExist(instance *Instance) error
func (*LocalRepository) FindByID ¶
func (repo *LocalRepository) FindByID(instanceID string) (*Instance, error)
func (*LocalRepository) InstanceBaseDir ¶
func (repo *LocalRepository) InstanceBaseDir(instanceID string) string
func (*LocalRepository) InstanceConfigPath ¶
func (repo *LocalRepository) InstanceConfigPath(instanceID string) string
func (*LocalRepository) InstanceCount ¶
func (repo *LocalRepository) InstanceCount() (int, []error)
func (*LocalRepository) InstanceDataDir ¶
func (repo *LocalRepository) InstanceDataDir(instanceID string) string
func (*LocalRepository) InstanceExists ¶
func (repo *LocalRepository) InstanceExists(instanceID string) (bool, error)
func (*LocalRepository) InstanceLogDir ¶
func (repo *LocalRepository) InstanceLogDir(instanceID string) string
func (*LocalRepository) InstanceLogFilePath ¶
func (repo *LocalRepository) InstanceLogFilePath(instanceID string) string
func (*LocalRepository) InstancePid ¶
func (repo *LocalRepository) InstancePid(instanceID string) (pid int, err error)
func (*LocalRepository) InstancePidFilePath ¶
func (repo *LocalRepository) InstancePidFilePath(instanceID string) string
func (*LocalRepository) Lock ¶
func (repo *LocalRepository) Lock(instance *Instance) error
func (*LocalRepository) Setup ¶
func (repo *LocalRepository) Setup(instance *Instance) error
func (*LocalRepository) Unbind ¶
func (repo *LocalRepository) Unbind(instanceID string, bindingID string) error
func (*LocalRepository) Unlock ¶
func (repo *LocalRepository) Unlock(instance *Instance) error
func (*LocalRepository) WriteConfigFile ¶
func (repo *LocalRepository) WriteConfigFile(instance *Instance) error
type OSProcessController ¶
type OSProcessController struct { Logger lager.Logger InstanceInformer InstanceInformer ProcessChecker ProcessChecker ProcessKiller ProcessKiller PingFunc PingServerFunc WaitUntilConnectableFunc WaitUntilConnectableFunc RedisServerExecutablePath string Exec iexec.Exec }
func NewOSProcessController ¶
func NewOSProcessController( logger lager.Logger, instanceInformer InstanceInformer, processChecker ProcessChecker, processKiller ProcessKiller, pingFunc PingServerFunc, waitUntilConnectableFunc WaitUntilConnectableFunc, redisServerExecutablePath string, ) *OSProcessController
func (*OSProcessController) EnsureRunning ¶
func (controller *OSProcessController) EnsureRunning(instance *Instance, configPath, instanceDataDir, pidfilePath, logfilePath string) error
func (*OSProcessController) Kill ¶
func (controller *OSProcessController) Kill(instance *Instance) error
func (*OSProcessController) StartAndWaitUntilReady ¶
func (*OSProcessController) StartAndWaitUntilReadyWithConfig ¶
type PingServerFunc ¶
type ProcessChecker ¶
type ProcessController ¶
type ProcessKiller ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.