Documentation ¶
Overview ¶
Package broker holds the provisioning implementation of the service broker, providing an interface for service provisioning and binding but leaving API implementation to a containing layer
Index ¶
- Variables
- func CompactUUIDString(uuid string) (string, error)
- type BasicCred
- type Binder
- type ClusterDetails
- type CreateRequest
- type ErrNoInstance
- type Executor
- type Mock
- func (m *Mock) ClusterDetail(instanceID string) (ClusterDetails, error)
- func (m *Mock) CreateBinding(instanceID, bindID, appID string) (BasicCred, error)
- func (m *Mock) CreateCluster(req CreateRequest) error
- func (m *Mock) DeleteBinding(instanceID, bindID string) error
- func (m *Mock) DeleteCluster(instanceID string) error
- type PGOperator
- func (po *PGOperator) ClusterDetail(instanceID string) (ClusterDetails, error)
- func (po *PGOperator) CreateBinding(instanceID, bindID, appID string) (BasicCred, error)
- func (po *PGOperator) CreateCluster(req CreateRequest) error
- func (po *PGOperator) DeleteBinding(instanceID, bindID string) error
- func (po *PGOperator) DeleteCluster(instanceID string) error
- type Provisioner
Constants ¶
This section is empty.
Variables ¶
var (
ErrBindingsRemain = errors.New("one or more bindings still exist, unbind before deleting")
)
var MockStatic struct { ExternalIP string ClusterIP string Password string }
Encapsulate test global data
Functions ¶
func CompactUUIDString ¶
CompactUUIDString reduces the string representation of a UUID into a shortened base32 representation of the same bits Example Input: "a7cb6bd8-cf67-400f-805c-019e85eac3bf" Example Output: "U7FWXWGPM5AA7AC4AGPIL2WDX4"
Types ¶
type Binder ¶
type Binder interface { CreateBinding(instanceID, bindID, appID string) (BasicCred, error) DeleteBinding(instanceID, bindID string) error }
Binder defines an interface for creating and deleting user bindings
type ClusterDetails ¶
ClusterDetails encapsulates information returned about the cluster
type CreateRequest ¶
type ErrNoInstance ¶
type ErrNoInstance struct {
ID string
}
func (ErrNoInstance) Error ¶
func (ni ErrNoInstance) Error() string
type Executor ¶
type Executor interface { Provisioner Binder ClusterDetail(instanceID string) (ClusterDetails, error) }
Executor defines an interface for servicing OSB requests
type Mock ¶
func (*Mock) ClusterDetail ¶
func (m *Mock) ClusterDetail(instanceID string) (ClusterDetails, error)
func (*Mock) CreateBinding ¶
func (*Mock) CreateCluster ¶
func (m *Mock) CreateCluster(req CreateRequest) error
func (*Mock) DeleteBinding ¶
func (*Mock) DeleteCluster ¶
type PGOperator ¶
type PGOperator struct {
// contains filtered or unexported fields
}
func NewPGOperator ¶
func NewPGOperator(KubeClient *rest.RESTClient, APIServerURL, basicAuthUsername, basicAuthPassword, clientVersion string) (*PGOperator, error)
NewPGOperator sets up authentication information for a PGO client
func (*PGOperator) ClusterDetail ¶
func (po *PGOperator) ClusterDetail(instanceID string) (ClusterDetails, error)
ClusterDetail returns the content provided by the operator's Show Cluster
func (*PGOperator) CreateBinding ¶
func (po *PGOperator) CreateBinding(instanceID, bindID, appID string) (BasicCred, error)
CreateBinding creates and/or returns binding information for a cluster
func (*PGOperator) CreateCluster ¶
func (po *PGOperator) CreateCluster(req CreateRequest) error
CreateCluster implements the PGOperator interface for creating clusters
func (*PGOperator) DeleteBinding ¶
func (po *PGOperator) DeleteBinding(instanceID, bindID string) error
DeleteBinding deletes existing binding users based on instance and bindID
func (*PGOperator) DeleteCluster ¶
func (po *PGOperator) DeleteCluster(instanceID string) error
DeleteCluster implements the PGOperator interface for deleting clusters It also ensures all bindings are deleted prior to attempting to delete the cluster so that a clear error can be returned
type Provisioner ¶
type Provisioner interface { CreateCluster(req CreateRequest) error DeleteCluster(instanceID string) error }
Provisioner defines an interface for (de)provisioning clusters