forked from juju/juju
-
Notifications
You must be signed in to change notification settings - Fork 0
/
broker.go
32 lines (25 loc) · 1.16 KB
/
broker.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
// Copyright 2017 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package caasunitprovisioner
import (
"github.com/juju/names/v4"
"github.com/juju/juju/caas"
"github.com/juju/juju/core/config"
"github.com/juju/juju/core/watcher"
)
type ContainerBroker interface {
Provider() caas.ContainerEnvironProvider
WatchOperator(string) (watcher.NotifyWatcher, error)
Operator(string) (*caas.Operator, error)
WatchUnits(appName string, mode caas.DeploymentMode) (watcher.NotifyWatcher, error)
Units(appName string, mode caas.DeploymentMode) ([]caas.Unit, error)
AnnotateUnit(appName string, mode caas.DeploymentMode, podName string, unit names.UnitTag) error
}
type ServiceBroker interface {
Provider() caas.ContainerEnvironProvider
EnsureService(appName string, statusCallback caas.StatusCallbackFunc, params *caas.ServiceParams, numUnits int, config config.ConfigAttributes) error
DeleteService(appName string) error
UnexposeService(appName string) error
GetService(appName string, mode caas.DeploymentMode, includeClusterIP bool) (*caas.Service, error)
WatchService(appName string, mode caas.DeploymentMode) (watcher.NotifyWatcher, error)
}