utilities

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenClientPassword

func GenClientPassword() string

Generate a random password.

func GetKind

func GetKind(details interface{}) (string, error)

Given a broker request details object, determine which of the supported services the request is about.

func MakeAppName

func MakeAppName(serviceId string, instanceId string) string

Generate an app name based on the kind of service in question and a service instance ID.

func MakeClientIdForBinding

func MakeClientIdForBinding(serviceId string, bindingId string) string

Generate a UAA client ID binding name based on the kind of service in question and the binding's ID.

func SafeApp added in v1.0.0

func SafeApp(app ccv3.Application) ccv3.Application

Types

type RegistryConfig added in v1.0.0

type RegistryConfig struct {
	Mode  string
	Peers []*RegistryPeer
}

func NewRegistryConfig added in v1.0.0

func NewRegistryConfig() *RegistryConfig

func (*RegistryConfig) AddPeer added in v1.0.0

func (rc *RegistryConfig) AddPeer(idx int, uri string, serviceinstanceID string)

func (*RegistryConfig) Clustered added in v1.0.0

func (rc *RegistryConfig) Clustered()

func (*RegistryConfig) Standalone added in v1.0.0

func (rc *RegistryConfig) Standalone()

type RegistryParams

type RegistryParams struct {
	RawCount                 int    `json:"count"`
	ApplicationSecurityGroup string `json:"application_security_group"`
}

func ExtractRegistryParams

func ExtractRegistryParams(details string) (*RegistryParams, error)

func NewRegistryParams added in v1.0.0

func NewRegistryParams() *RegistryParams

func (*RegistryParams) Count added in v1.0.0

func (rp *RegistryParams) Count() (int, error)

type RegistryPeer added in v1.0.0

type RegistryPeer struct {
	Index             int    `json:"index"`
	Count             int    `json:"nodeCount"`
	URI               string `json:"uri"`
	ServiceInstanceId string `json:"service-instance-id"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL