Documentation ¶
Index ¶
- Constants
- func AwaitServiceAvailable(serviceName string)
- func AwaitServiceDeletion(serviceName string)
- func BindSecurityGroup(securityGroupName, orgName, spaceName string)
- func Cf(args ...string) *gexec.Session
- func CfWithBufferedOutput(args ...string) (s *gexec.Session)
- func CfWithTimeout(timeout time.Duration, args ...string) *gexec.Session
- func CreateSecurityGroup(securityGroupName string)
- func CreateService(serviceOffering, servicePlan, serviceName, params string)
- func CreateServiceKey(serviceName, keyName string)
- func DeleteApp(appName string)
- func DeleteSecurityGroup(securityGroupName string)
- func DeleteService(serviceName string)
- func DeleteServiceKey(serviceName, keyName string)
- func LookupAppURL(appName string) string
- func PrintAppLogs(appName string)
- func PushAndBindApp(appName, serviceName, testAppPath string) string
- func ReceiveMessage(testAppURL, queueName string) string
- func SendMessage(testAppURL, queueName, message string)
- func UnbindService(appName, serviceName string)
- func UpdateService(serviceName, params string)
- type ServiceKey
Constants ¶
const ( FiveSecondTimeout = 5 * time.Second ThirtyMinuteTimeout = 30 * time.Minute )
const COMMAND_TIMEOUT = 5 * time.Minute
const RETRY_LIMIT = 5
Variables ¶
This section is empty.
Functions ¶
func AwaitServiceAvailable ¶
func AwaitServiceAvailable(serviceName string)
Keeps polling `cf service <service-name>` until service is created or updated. For on-demand offerings the operation of creating or updating a service instance is async, which means that cf-cli immediately return `exit 0` while the operation is been handled in the background by On-Demand broker. This should be fast for multitenant offering, given that it's a sync operation.
func AwaitServiceDeletion ¶
func AwaitServiceDeletion(serviceName string)
Keeps polling `cf services` until service is no longer found in the services list. For On-Demand offerings this operation is async and might take longer.
func BindSecurityGroup ¶
func BindSecurityGroup(securityGroupName, orgName, spaceName string)
func CfWithBufferedOutput ¶
CfWithBufferedOutput runs cf with given args. It has a command timeout of COMMAND_TIMEOUT minutes, and retries failed commands up to RETRY_LIMIT. The output of the command is not sent to the standard output. Output of the command can be accessed via the returned Session.
func CreateSecurityGroup ¶
func CreateSecurityGroup(securityGroupName string)
func CreateService ¶
func CreateService(serviceOffering, servicePlan, serviceName, params string)
func CreateServiceKey ¶
func CreateServiceKey(serviceName, keyName string)
func DeleteSecurityGroup ¶
func DeleteSecurityGroup(securityGroupName string)
func DeleteService ¶
func DeleteService(serviceName string)
func DeleteServiceKey ¶
func DeleteServiceKey(serviceName, keyName string)
func LookupAppURL ¶
func PrintAppLogs ¶
func PrintAppLogs(appName string)
func PushAndBindApp ¶
func ReceiveMessage ¶
func SendMessage ¶
func SendMessage(testAppURL, queueName, message string)
func UnbindService ¶
func UnbindService(appName, serviceName string)
func UpdateService ¶
func UpdateService(serviceName, params string)
Types ¶
type ServiceKey ¶
type ServiceKey struct { DashboardUrl string `json:"dashboard_url"` Username string `json:"username"` Password string `json:"password"` Hostname string `json:"hostname"` Hostnames []string `json:"hostnames"` HttpApiUri string `json:"http_api_uri"` HttpApiUris []string `json:"http_api_uris"` URI string `json:"uri"` URIs []string `json:"uris"` VHOST string `json:"vhost"` SSL bool `json:"ssl"` Protocols map[string]map[string]any `json:"protocols"` }
func GetServiceKey ¶
func GetServiceKey(serviceName, keyName string) ServiceKey