Documentation ¶
Index ¶
- Constants
- Variables
- func GetDockerRegistryInfo() (string, error)
- func IsRunning(commander docker.DockerCommander) bool
- func Patch(target OpenShiftPatchTarget, patch string, commander docker.DockerCommander) (bool, error)
- func RestartOpenShift(commander docker.DockerCommander) (bool, error)
- func ViewConfig(target OpenShiftPatchTarget, commander docker.DockerCommander) (string, error)
- type OpenShiftPatchTarget
- type Route
- type Service
- type ServiceSpec
- type ServiceWeight
Constants ¶
View Source
const OPENSHIFT_CONTAINER_NAME = "origin"
View Source
const OPENSHIFT_EXEC = "/usr/bin/openshift"
View Source
const (
ProjectsCustomCol = "-o=custom-columns=NAME:.metadata.name"
)
Variables ¶
View Source
var ( MASTER = OpenShiftPatchTarget{ "master", "/var/lib/origin/openshift.local.config/master/master-config.yaml", "/var/lib/minishift/openshift.local.config/master/master-config.yaml", "", } NODE = OpenShiftPatchTarget{ "node", "/var/lib/origin/openshift.local.config/node-%s/node-config.yaml", "/var/lib/minishift/openshift.local.config/node-%s/node-config.yaml", "", } UNKNOWN = OpenShiftPatchTarget{ "unkown", "", "", "", } )
Functions ¶
func GetDockerRegistryInfo ¶
func IsRunning ¶ added in v1.2.0
func IsRunning(commander docker.DockerCommander) bool
IsRunning checks whether the origin container is in running state. This method returns true if the origin container is running, false otherwise
func Patch ¶
func Patch(target OpenShiftPatchTarget, patch string, commander docker.DockerCommander) (bool, error)
func RestartOpenShift ¶
func RestartOpenShift(commander docker.DockerCommander) (bool, error)
func ViewConfig ¶
func ViewConfig(target OpenShiftPatchTarget, commander docker.DockerCommander) (string, error)
Types ¶
type OpenShiftPatchTarget ¶
type OpenShiftPatchTarget struct {
// contains filtered or unexported fields
}
func (*OpenShiftPatchTarget) SetIp ¶
func (t *OpenShiftPatchTarget) SetIp(ip string)
type Route ¶ added in v1.3.0
type Route struct { Items []struct { Spec struct { AlternateBackends []struct { Name string `json:"name"` Weight int `json:"weight"` } `json:"alternateBackends"` Host string `json:"host"` To struct { Name string `json:"name"` Weight int `json:"weight"` } `json:"to"` } `json:"spec"` } `json:"items"` }
type ServiceSpec ¶ added in v1.3.0
type ServiceSpec struct { Namespace string Name string URL []string NodePort string Weight []string }
func GetServiceSpecs ¶ added in v1.3.0
func GetServiceSpecs(serviceNamespace string) ([]ServiceSpec, error)
GetServiceSpecs takes Namespace string and return route/nodeport/name/weight in a ServiceSpec structure
type ServiceWeight ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.