openshift

package
v1.31.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectsCustomCol = "-o=custom-columns=NAME:.metadata.name"
)

Variables

This section is empty.

Functions

func GetDockerRegistryInfo

func GetDockerRegistryInfo(registryAddonEnabled bool, openshiftVersion string) (string, error)

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 GetOpenShiftPatchTarget added in v1.22.0

func GetOpenShiftPatchTarget(target string) OpenShiftPatchTarget

type Route added in v1.3.0

type Route struct {
	Name   string
	Weight string
	Tls    string
}

type RouteSpec added in v1.17.0

type RouteSpec struct {
	Items []struct {
		Spec struct {
			AlternateBackends []struct {
				Name   string `json:"name"`
				Weight int    `json:"weight"`
			} `json:"alternateBackends"`
			Host string `json:"host"`
			Tls  struct {
				Termination string `json:"termination"`
			} `json:"tls"`
			To struct {
				Name   string `json:"name"`
				Weight int    `json:"weight"`
			} `json:"to"`
		} `json:"spec"`
	} `json:"items"`
}

type Service added in v1.3.0

type Service struct {
	Namespace string
	Name      string
	URL       []string
	NodePort  string
	Weight    []string
}

func GetServices added in v1.17.0

func GetServices(serviceNamespace string) ([]Service, error)

GetServices takes Namespace string and return route/nodeport/name/weight in a Service structure

type ServiceSpec added in v1.3.0

type ServiceSpec struct {
	Items []struct {
		Metadata struct {
			Name string `json:"name"`
		} `json:"metadata"`
		Spec struct {
			Ports []struct {
				NodePort int `json:"nodePort"`
			} `json:"ports"`
		} `json:"spec"`
	} `json:"items"`
}

type Services added in v1.17.0

type Services struct {
	Service map[string]*Service
}

func NewServices added in v1.17.0

func NewServices() *Services

func (*Services) Add added in v1.17.0

func (s *Services) Add(route Route, routeURL, namespace, nodePort string)

func (*Services) HasService added in v1.17.0

func (s *Services) HasService(name string) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL