Documentation ¶
Index ¶
- func PingServer(instance *Instance) error
- type AgentClient
- type Credentials
- 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 RemoteAgentClient
- type RemoteRepository
- func (repo *RemoteRepository) AllInstances() ([]*Instance, error)
- func (repo *RemoteRepository) AvailableInstances() []*Instance
- func (repo *RemoteRepository) Bind(instanceID string, bindingID string) (broker.InstanceCredentials, error)
- func (repo *RemoteRepository) BindingsForInstance(instanceID string) ([]string, error)
- func (repo *RemoteRepository) Create(instanceID string) error
- func (repo *RemoteRepository) Destroy(instanceID string) error
- func (repo *RemoteRepository) FindByID(instanceID string) (*Instance, error)
- func (repo *RemoteRepository) IDForHost(host string) string
- func (repo *RemoteRepository) InstanceCount() (int, error)
- func (repo *RemoteRepository) InstanceExists(instanceID string) (bool, error)
- func (repo *RemoteRepository) InstanceLimit() int
- func (repo *RemoteRepository) PersistStatefile() error
- func (repo *RemoteRepository) StateFromFile() (Statefile, error)
- func (repo *RemoteRepository) Unbind(instanceID string, bindingID string) error
- type Statefile
- type WaitUntilConnectableFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PingServer ¶
Types ¶
type AgentClient ¶
type AgentClient interface { Reset(hostIP string) error Credentials(hostIP string) (Credentials, error) }
type Credentials ¶
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 // contains filtered or unexported fields }
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 ¶
type RemoteAgentClient ¶
type RemoteAgentClient struct {
// contains filtered or unexported fields
}
func NewRemoteAgentClient ¶
func NewRemoteAgentClient(port, username, password string, secure bool) *RemoteAgentClient
func (*RemoteAgentClient) Credentials ¶
func (client *RemoteAgentClient) Credentials(host string) (Credentials, error)
func (*RemoteAgentClient) Keycount ¶
func (client *RemoteAgentClient) Keycount(host string) (int, error)
func (*RemoteAgentClient) Reset ¶
func (client *RemoteAgentClient) Reset(host string) error
type RemoteRepository ¶
func NewRemoteRepository ¶
func NewRemoteRepository(agentClient AgentClient, config brokerconfig.Config, logger lager.Logger) (*RemoteRepository, error)
func (*RemoteRepository) AllInstances ¶
func (repo *RemoteRepository) AllInstances() ([]*Instance, error)
func (*RemoteRepository) AvailableInstances ¶
func (repo *RemoteRepository) AvailableInstances() []*Instance
func (*RemoteRepository) Bind ¶
func (repo *RemoteRepository) Bind(instanceID string, bindingID string) (broker.InstanceCredentials, error)
func (*RemoteRepository) BindingsForInstance ¶
func (repo *RemoteRepository) BindingsForInstance(instanceID string) ([]string, error)
func (*RemoteRepository) Create ¶
func (repo *RemoteRepository) Create(instanceID string) error
func (*RemoteRepository) Destroy ¶
func (repo *RemoteRepository) Destroy(instanceID string) error
func (*RemoteRepository) FindByID ¶
func (repo *RemoteRepository) FindByID(instanceID string) (*Instance, error)
func (*RemoteRepository) IDForHost ¶
func (repo *RemoteRepository) IDForHost(host string) string
func (*RemoteRepository) InstanceCount ¶
func (repo *RemoteRepository) InstanceCount() (int, error)
func (*RemoteRepository) InstanceExists ¶
func (repo *RemoteRepository) InstanceExists(instanceID string) (bool, error)
func (*RemoteRepository) InstanceLimit ¶
func (repo *RemoteRepository) InstanceLimit() int
func (*RemoteRepository) PersistStatefile ¶
func (repo *RemoteRepository) PersistStatefile() error
func (*RemoteRepository) StateFromFile ¶
func (repo *RemoteRepository) StateFromFile() (Statefile, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.