Documentation ¶
Index ¶
- Constants
- func ConvertIngressURLToIngress(ingressURL URL, serviceName string) iextensionsv1.Ingress
- func Create(client *occlient.Client, kClient *kclient.Client, parameters CreateParameters, ...) (string, error)
- func Delete(client *occlient.Client, kClient *kclient.Client, urlName string, ...) error
- func Exists(client *occlient.Client, urlName string, componentName string, ...) (bool, error)
- func GetProtocol(route routev1.Route, ingress iextensionsv1.Ingress) string
- func GetURLName(componentName string, componentPort int) string
- func GetURLString(protocol, URL string, ingressDomain string, isExperimentalMode bool) string
- func GetValidExposedPortNumber(exposedPort int) (int, error)
- func GetValidPortNumber(componentName string, portNumber int, portList []string) (int, error)
- func Push(client *occlient.Client, kClient *kclient.Client, parameters PushParameters) error
- type CreateParameters
- type PushParameters
- type StateType
- type URL
- func ConvertConfigURL(configURL config.ConfigURL) URL
- func ConvertEnvinfoURL(envinfoURL envinfo.EnvInfoURL, serviceName string) URL
- func Get(client *occlient.Client, localConfig *config.LocalConfigInfo, urlName string, ...) (URL, error)
- func GetContainerURL(client *lclient.Client, envSpecificInfo *envinfo.EnvSpecificInfo, ...) (URL, error)
- func GetIngressOrRoute(client *occlient.Client, kClient *kclient.Client, ...) (URL, error)
- type URLList
- func List(client *occlient.Client, localConfig *config.LocalConfigInfo, ...) (URLList, error)
- func ListDockerURL(client *lclient.Client, componentName string, ...) (URLList, error)
- func ListIngressAndRoute(oclient *occlient.Client, client *kclient.Client, ...) (URLList, error)
- func ListPushed(client *occlient.Client, componentName string, applicationName string) (URLList, error)
- func ListPushedIngress(client *kclient.Client, componentName string) (URLList, error)
- type URLSpec
- type URLStatus
Constants ¶
const ( // StateTypePushed means that URL is present both locally and on cluster/container StateTypePushed = "Pushed" // StateTypeNotPushed means that URL is only in local config, but not on the cluster/container StateTypeNotPushed = "Not Pushed" // StateTypeLocallyDeleted means that URL was deleted from the local config, but it is still present on the cluster/container StateTypeLocallyDeleted = "Locally Deleted" )
Variables ¶
This section is empty.
Functions ¶
func ConvertIngressURLToIngress ¶ added in v1.2.2
func ConvertIngressURLToIngress(ingressURL URL, serviceName string) iextensionsv1.Ingress
ConvertIngressURLToIngress converts IngressURL to Ingress
func Create ¶
func Create(client *occlient.Client, kClient *kclient.Client, parameters CreateParameters, isRouteSupported bool, isExperimental bool) (string, error)
Create creates a URL and returns url string and error if any portNumber is the target port number for the route and is -1 in case no port number is specified in which case it is automatically detected for components which expose only one service port)
func Delete ¶
func Delete(client *occlient.Client, kClient *kclient.Client, urlName string, applicationName string, urlType envinfo.URLKind) error
Delete deletes a URL
func Exists ¶ added in v0.0.9
func Exists(client *occlient.Client, urlName string, componentName string, applicationName string) (bool, error)
Exists checks if the url exists in the component or not urlName is the name of the url for checking componentName is the name of the component to which the url's existence is checked applicationName is the name of the application to which the url's existence is checked
func GetProtocol ¶ added in v1.1.2
func GetProtocol(route routev1.Route, ingress iextensionsv1.Ingress) string
GetProtocol returns the protocol string
func GetURLName ¶ added in v0.0.18
GetURLName returns a url name from the component name and the given port number
func GetURLString ¶ added in v0.0.17
GetURLString returns a string representation of given url
func GetValidExposedPortNumber ¶ added in v1.2.0
GetValidExposedPortNumber checks if the given exposed port number is a valid port or not if exposed port is not provided, a random free port will be generated and returned
func GetValidPortNumber ¶ added in v0.0.18
GetValidPortNumber checks if the given port number is a valid component port or not if port number is not provided and the component is a single port component, the component port is returned port number is -1 if the user does not specify any port
Types ¶
type CreateParameters ¶ added in v1.2.1
type CreateParameters struct {
// contains filtered or unexported fields
}
type PushParameters ¶ added in v1.2.1
type URL ¶
type URL struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec URLSpec `json:"spec,omitempty"` Status URLStatus `json:"status,omitempty"` }
URL is
func ConvertConfigURL ¶ added in v1.0.2
ConvertConfigURL converts ConfigURL to URL
func ConvertEnvinfoURL ¶ added in v1.2.2
func ConvertEnvinfoURL(envinfoURL envinfo.EnvInfoURL, serviceName string) URL
ConvertEnvinfoURL converts EnvinfoURL to URL
func Get ¶ added in v1.1.2
func Get(client *occlient.Client, localConfig *config.LocalConfigInfo, urlName string, applicationName string) (URL, error)
Get returns URL definition for given URL name
func GetContainerURL ¶ added in v1.2.1
func GetContainerURL(client *lclient.Client, envSpecificInfo *envinfo.EnvSpecificInfo, urlName string, componentName string) (URL, error)
GetContainer returns Docker URL definition for given URL name
type URLList ¶ added in v1.0.2
type URLList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []URL `json:"items"` }
URLList is a list of applications
func List ¶
func List(client *occlient.Client, localConfig *config.LocalConfigInfo, componentName string, applicationName string) (URLList, error)
List returns all URLs for given component. If componentName is empty string, it lists all url in a given application.
func ListDockerURL ¶ added in v1.2.1
func ListDockerURL(client *lclient.Client, componentName string, envSpecificInfo *envinfo.EnvSpecificInfo) (URLList, error)
ListDockerURL returns all Docker URLs for given component.
func ListIngressAndRoute ¶ added in v1.2.3
func ListIngressAndRoute(oclient *occlient.Client, client *kclient.Client, envSpecificInfo *envinfo.EnvSpecificInfo, componentName string, routeSupported bool) (URLList, error)
ListIngressAndRoute returns all Ingress and Route for given component.
func ListPushed ¶ added in v1.0.0
func ListPushed(client *occlient.Client, componentName string, applicationName string) (URLList, error)
ListPushed lists the URLs in an application that are in cluster. The results can further be narrowed down if a component name is provided, which will only list URLs for the given component
func ListPushedIngress ¶ added in v1.1.2
ListPushedIngress lists the ingress URLs on cluster for the given component
type URLSpec ¶ added in v1.0.2
type URLSpec struct { Host string `json:"host,omitempty"` Protocol string `json:"protocol,omitempty"` Port int `json:"port,omitempty"` Secure bool `json:"secure"` Kind envinfo.URLKind `json:"kind,omitempty"` TLSSecret string `json:"tlssecret,omitempty"` ExternalPort int `json:"externalport,omitempty"` }
URLSpec is