Documentation ¶
Index ¶
- Variables
- func CheckDeploymentService(svcName string, depSvc map[string]interface{}) error
- func NewNativeDeploymentConfigPlugin() plugin_registry.DeploymentConfigPlugin
- func SignImagesFromDeploymentMap(deployment map[string]interface{}, dontTouchImage bool) (imageList []string)
- type NativeDeploymentConfigPlugin
- func (p *NativeDeploymentConfigPlugin) DefaultConfig(imageInfo interface{}) interface{}
- func (p *NativeDeploymentConfigPlugin) GetContainerImages(dep interface{}) (bool, []string, error)
- func (p *NativeDeploymentConfigPlugin) Sign(dep map[string]interface{}, keyFilePath string, ...) (bool, string, string, error)
- func (p *NativeDeploymentConfigPlugin) StartTest(homeDirectory string, userInputFile string, configFiles []string, ...) bool
- func (p *NativeDeploymentConfigPlugin) StopTest(homeDirectory string) bool
- func (p *NativeDeploymentConfigPlugin) Validate(dep interface{}) (bool, error)
Constants ¶
This section is empty.
Variables ¶
var VALID_DEPLOYMENT_FIELDS = map[string]int8{"image": 1, "privileged": 1, "cap_add": 1, "environment": 1, "devices": 1, "binds": 1, "specific_ports": 1, "command": 1, "ports": 1, "ephemeral_ports": 1, "tmpfs": 1}
This can't be a const because a map literal isn't a const in go
Functions ¶
func CheckDeploymentService ¶
CheckDeploymentService verifies it has the required 'image' key, and checks for keys we don't recognize. For now it only prints a warning for unrecognized keys, in case we recently added a key to anax and haven't updated hzn yet.
func NewNativeDeploymentConfigPlugin ¶
func NewNativeDeploymentConfigPlugin() plugin_registry.DeploymentConfigPlugin
func SignImagesFromDeploymentMap ¶
func SignImagesFromDeploymentMap(deployment map[string]interface{}, dontTouchImage bool) (imageList []string)
SignImagesFromDeploymentMap finds the images in this deployment structure (if any) and appends them to the imageList
Types ¶
type NativeDeploymentConfigPlugin ¶
type NativeDeploymentConfigPlugin struct { }
func (*NativeDeploymentConfigPlugin) DefaultConfig ¶
func (p *NativeDeploymentConfigPlugin) DefaultConfig(imageInfo interface{}) interface{}
Given a map of image name and image pairs, the function returns a very simple deployment configuration to be used in the service definition.
func (*NativeDeploymentConfigPlugin) GetContainerImages ¶
func (p *NativeDeploymentConfigPlugin) GetContainerImages(dep interface{}) (bool, []string, error)
func (*NativeDeploymentConfigPlugin) Sign ¶
func (p *NativeDeploymentConfigPlugin) Sign(dep map[string]interface{}, keyFilePath string, ctx plugin_registry.PluginContext) (bool, string, string, error)
func (*NativeDeploymentConfigPlugin) StartTest ¶
func (p *NativeDeploymentConfigPlugin) StartTest(homeDirectory string, userInputFile string, configFiles []string, configType string, noFSS bool, userCreds string) bool
Start the native deployment config in test mode. Only services are supported.
func (*NativeDeploymentConfigPlugin) StopTest ¶
func (p *NativeDeploymentConfigPlugin) StopTest(homeDirectory string) bool
Stop the native deployment config in test mode. Only services are supported.
func (*NativeDeploymentConfigPlugin) Validate ¶
func (p *NativeDeploymentConfigPlugin) Validate(dep interface{}) (bool, error)