-
Notifications
You must be signed in to change notification settings - Fork 3
/
interfaces.go
65 lines (58 loc) · 1.7 KB
/
interfaces.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package framework
import (
"context"
)
// Cataloger lists all the available services.
type Cataloger interface {
// List lists all the available services.
List(
ctx context.Context,
serviceBrokerSpec ServiceBrokerSpec,
) ([]*Service, error)
}
// Provisioner provisions services instances.
type Provisioner interface {
// Provision provisions a service instance.
Provision(
ctx context.Context,
serviceBrokerSpec ServiceBrokerSpec,
req *ProvisionRequest,
) (*ProvisionResponse, error)
}
// Binder obtains valid credentials (and other connection details) for service instances.
type Binder interface {
// Bind obtains valid credentials (and other connection details) for a service instance.
Bind(
ctx context.Context,
serviceBrokerSpec ServiceBrokerSpec,
req *BindRequest,
) (*BindResponse, error)
}
// Unbinder invalidates credentials for service instances.
type Unbinder interface {
// Unbind invalidates the specified credentials.
Unbind(
ctx context.Context,
serviceBrokerSpec ServiceBrokerSpec,
req *UnbindRequest,
) error
}
// Deprovisioner deprovisions service instances.
type Deprovisioner interface {
// Deprovision deprovisions a service instance.
Deprovision(
ctx context.Context,
serviceBrokerSpec ServiceBrokerSpec,
req *DeprovisionRequest,
) (*DeprovisionResponse, error)
}
// OperationStatusRetriever fetches the status of an asynchronous operation that is pending
// completion.
type OperationStatusRetriever interface {
// GetOperationStatus fetches the status of an asynchronous operation that is pending completion.
GetOperationStatus(
ctx context.Context,
serviceBrokerSpec ServiceBrokerSpec,
req *OperationStatusRequest,
) (*OperationStatusResponse, error)
}