Documentation
¶
Index ¶
- type BoshClient
- func (c *BoshClient) CreateInstance(parameters interface{}) (string, error)
- func (c *BoshClient) DeleteInstance(instanceID string) error
- func (c *BoshClient) GetCatalog() *model.Catalog
- func (c *BoshClient) GetCredentials(instanceID string) (*model.Credential, error)
- func (c *BoshClient) GetInstanceState(instanceID string) (string, error)
- func (c *BoshClient) InjectKeyPair(instanceID string) (string, string, string, error)
- func (c *BoshClient) IsValidPlan(planName string) bool
- func (c *BoshClient) RemoveCredentials(instanceID string, bindingID string) error
- func (c *BoshClient) RevokeKeyPair(instanceID string, privateKeyName string) error
- func (c *BoshClient) SetCatalog(catalog *model.Catalog) error
- type Client
- type DockerClient
- func (c *DockerClient) CreateInstance(parameters interface{}) (string, error)
- func (c *DockerClient) DeleteInstance(instanceID string) error
- func (c *DockerClient) GetCatalog() *model.Catalog
- func (c *DockerClient) GetCredentials(instanceID string) (*model.Credential, error)
- func (c *DockerClient) GetInstanceState(instanceID string) (string, error)
- func (c *DockerClient) InjectKeyPair(instanceID string) (string, string, string, error)
- func (c *DockerClient) IsValidPlan(planName string) bool
- func (c *DockerClient) RemoveCredentials(instanceID string, bindingID string) error
- func (c *DockerClient) RevokeKeyPair(instanceID string, privateKeyName string) error
- func (c *DockerClient) SetCatalog(catalog *model.Catalog) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoshClient ¶
type BoshClient struct {
// contains filtered or unexported fields
}
A BoshClient manages aconnection to a BOSH director.
func NewBoshClient ¶
func NewBoshClient(configFile string) *BoshClient
NewBoshClient creates and returns a BoshClient for use in working with a BOSH director.
func (*BoshClient) CreateInstance ¶
func (c *BoshClient) CreateInstance(parameters interface{}) (string, error)
CreateInstance is the qquivalent of: bosh run -d --name=cb-test couchbase.
func (*BoshClient) DeleteInstance ¶
func (c *BoshClient) DeleteInstance(instanceID string) error
DeleteInstance deletes the instance in Bosh with the associated instanceID.
func (*BoshClient) GetCatalog ¶
func (c *BoshClient) GetCatalog() *model.Catalog
GetCatalog returns the catalog object for this broker.
func (*BoshClient) GetCredentials ¶
func (c *BoshClient) GetCredentials(instanceID string) (*model.Credential, error)
GetCredentials will configure the Couchbase instance with credentials and a bucket and other settings
func (*BoshClient) GetInstanceState ¶
func (c *BoshClient) GetInstanceState(instanceID string) (string, error)
GetInstanceState returns a string indicating the state of the instance. state == pending, running, succeeded, failed
func (*BoshClient) InjectKeyPair ¶
InjectKeyPair is a stub to implement the client API.
func (*BoshClient) IsValidPlan ¶
func (c *BoshClient) IsValidPlan(planName string) bool
IsValidPlan checks the given planName to ensure it appears in the catalog.
func (*BoshClient) RemoveCredentials ¶
func (c *BoshClient) RemoveCredentials(instanceID string, bindingID string) error
RemoveCredentials does not really remove credentials for Couchbase, since there may be other app instances bound to this service instance, or they may want to reuse that instance.
func (*BoshClient) RevokeKeyPair ¶
func (c *BoshClient) RevokeKeyPair(instanceID string, privateKeyName string) error
RevokeKeyPair is a stub to implement the client API.
func (*BoshClient) SetCatalog ¶
func (c *BoshClient) SetCatalog(catalog *model.Catalog) error
SetCatalog sets the catalog object for this broker.
type Client ¶
type Client interface { CreateInstance(parameters interface{}) (string, error) GetInstanceState(instanceID string) (string, error) DeleteInstance(instanceID string) error // new interface GetCredentials(instanceID string) (*model.Credential, error) RemoveCredentials(instanceID string, bindingID string) error // old SSH to a VM interface InjectKeyPair(instanceID string) (string, string, string, error) RevokeKeyPair(instanceID string, privateKey string) error SetCatalog(catalog *model.Catalog) error GetCatalog() *model.Catalog IsValidPlan(planName string) bool }
A Client implements the connection to some type of IaaS to provide services via a service broker.
type DockerClient ¶
type DockerClient struct {
// contains filtered or unexported fields
}
DockerClient holds information about a connection to docker.
func NewDockerClient ¶
func NewDockerClient() *DockerClient
NewDockerClient returns a new DockerClient.
func (*DockerClient) CreateInstance ¶
func (c *DockerClient) CreateInstance(parameters interface{}) (string, error)
CreateInstance is the equivalent of: docker run -d --name=cb-test couchbase.
func (*DockerClient) DeleteInstance ¶
func (c *DockerClient) DeleteInstance(instanceID string) error
DeleteInstance will delete the supplied instanceID from the Docker host.
func (*DockerClient) GetCatalog ¶
func (c *DockerClient) GetCatalog() *model.Catalog
GetCatalog returns the catalog object for this broker.
func (*DockerClient) GetCredentials ¶
func (c *DockerClient) GetCredentials(instanceID string) (*model.Credential, error)
GetCredentials will configure the Couchbase instance with credentials and a bucket and other settings.
func (*DockerClient) GetInstanceState ¶
func (c *DockerClient) GetInstanceState(instanceID string) (string, error)
GetInstanceState returns the state of this DockerClient. state == pending, running, succeeded, failed
func (*DockerClient) InjectKeyPair ¶
InjectKeyPair is a stub to implement the client API.
func (*DockerClient) IsValidPlan ¶
func (c *DockerClient) IsValidPlan(planName string) bool
IsValidPlan returns a boolean indicating whether the given planName is in the catalog.
func (*DockerClient) RemoveCredentials ¶
func (c *DockerClient) RemoveCredentials(instanceID string, bindingID string) error
RemoveCredentials is a stub to implement the Client interface.
func (*DockerClient) RevokeKeyPair ¶
func (c *DockerClient) RevokeKeyPair(instanceID string, privateKeyName string) error
RevokeKeyPair is a stub to implement the client API.
func (*DockerClient) SetCatalog ¶
func (c *DockerClient) SetCatalog(catalog *model.Catalog) error
SetCatalog sets the catalog object for this broker.