Documentation ¶
Index ¶
- Constants
- Variables
- func Deprovision(instance *ServiceInstance, log *logging.Logger) error
- func DumpJSON(obj interface{}) (string, error)
- func LoadJSON(payload string, obj interface{}) error
- func LoadYAML(payload string, obj interface{}) error
- func Provision(spec *Spec, parameters *Parameters, clusterConfig ClusterConfig, ...) error
- type Client
- type ClusterConfig
- type DevRegistry
- type DockerHubRegistry
- type ImageData
- type ParameterDescriptor
- type Parameters
- type RHCCRegistry
- type Registry
- type RegistryConfig
- type ServiceInstance
- type Spec
- type SpecManifest
Constants ¶
View Source
const AppsPath = "/ansibleapps"
Variables ¶
View Source
var AnsibleAppSpecLabel = "com.redhat.ansibleapp.spec"
View Source
var DockerSocket = "unix:///var/run/docker.sock"
View Source
var HardcodedClusterConfig = ClusterConfig{
Target: "10.1.2.2:8443",
User: "admin",
Password: "admin",
}
View Source
var ListImagesScript = "get_images_for_org.sh"
Functions ¶
func Deprovision ¶
func Deprovision(instance *ServiceInstance, log *logging.Logger) error
func Provision ¶
func Provision( spec *Spec, parameters *Parameters, clusterConfig ClusterConfig, log *logging.Logger, ) error
TODO: Figure out the right way to allow ansibleapp to log It's passed in here, but that's a hard coupling point to github.com/op/go-logging, which is used all over the broker Maybe ansibleapp defines its own interface and accepts that optionally Little looser, but still not great
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) RunImage ¶
func (c *Client) RunImage( action string, clusterConfig ClusterConfig, spec *Spec, p *Parameters, ) ([]byte, error)
type ClusterConfig ¶
type DevRegistry ¶
type DevRegistry struct {
// contains filtered or unexported fields
}
func (*DevRegistry) Init ¶
func (r *DevRegistry) Init(config RegistryConfig, log *logging.Logger) error
func (*DevRegistry) LoadSpecs ¶
func (r *DevRegistry) LoadSpecs() ([]*Spec, error)
type DockerHubRegistry ¶
type DockerHubRegistry struct { ScriptsDir string // contains filtered or unexported fields }
func (*DockerHubRegistry) Init ¶
func (r *DockerHubRegistry) Init(config RegistryConfig, log *logging.Logger) error
func (*DockerHubRegistry) LoadSpecs ¶
func (r *DockerHubRegistry) LoadSpecs() ([]*Spec, error)
type ParameterDescriptor ¶
type Parameters ¶
type Parameters map[string]interface{}
type RHCCRegistry ¶
type RHCCRegistry struct {
// contains filtered or unexported fields
}
func (*RHCCRegistry) Init ¶
func (r *RHCCRegistry) Init(config RegistryConfig, log *logging.Logger) error
func (*RHCCRegistry) LoadSpecs ¶
func (r *RHCCRegistry) LoadSpecs() ([]*Spec, error)
type Registry ¶
type Registry interface { Init(RegistryConfig, *logging.Logger) error LoadSpecs() ([]*Spec, error) }
func NewRegistry ¶
func NewRegistry(config RegistryConfig, log *logging.Logger) (Registry, error)
type RegistryConfig ¶
type ServiceInstance ¶
type ServiceInstance struct { Id uuid.UUID `json:"id"` Spec *Spec `json:"spec"` Parameters *Parameters `json:"parameters"` }
type SpecManifest ¶
func NewSpecManifest ¶
func NewSpecManifest(specs []*Spec) SpecManifest
Click to show internal directories.
Click to hide internal directories.