Documentation ¶
Index ¶
- Constants
- func Create(client *occlient.Client, kClient *kclient.Client, urlName string, ...) (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 GetIngress(kClient *kclient.Client, envSpecificInfo *envinfo.EnvSpecificInfo, ...) (iextensionsv1.Ingress, error)
- func GetProtocol(route routev1.Route, ingress iextensionsv1.Ingress) string
- func GetURLName(componentName string, componentPort int) string
- func GetURLString(protocol, URL string, ingressDomain string) string
- func GetValidPortNumber(componentName string, portNumber int, portList []string) (int, error)
- func ListPushedIngress(client *kclient.Client, componentName string) (iextensionsv1.IngressList, error)
- type StateType
- type URL
- type URLList
- type URLSpec
- type URLStatus
Constants ¶
const ( // StateTypePushed means that URL is present both locally and on cluster StateTypePushed = "Pushed" // StateTypeNotPushed means that URL is only in local config, but not on the cluster StateTypeNotPushed = "Not Pushed" // StateTypeLocallyDeleted means that URL was deleted from the local config, but it is still present on the cluster StateTypeLocallyDeleted = "Locally Deleted" )
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(client *occlient.Client, kClient *kclient.Client, urlName string, portNumber int, secureURL bool, componentName, applicationName string, host string, secretName string) (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) 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 GetIngress ¶ added in v1.1.2
func GetIngress(kClient *kclient.Client, envSpecificInfo *envinfo.EnvSpecificInfo, urlName string) (iextensionsv1.Ingress, error)
GetIngress returns ingress spec for given URL name
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 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
func ListPushedIngress ¶ added in v1.1.2
func ListPushedIngress(client *kclient.Client, componentName string) (iextensionsv1.IngressList, error)
ListPushedIngress lists the ingress URLs for the given component
Types ¶
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
type URLList ¶ added in v1.0.2
type URLList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []URL `json:"items"` }
AppList 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 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