forked from openshift/origin
/
types.go
28 lines (23 loc) · 836 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package api
import (
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
)
// Route encapsulates the inputs needed to connect a DNS/alias to a service proxy.
type Route struct {
kapi.TypeMeta `json:",inline"`
kapi.ObjectMeta `json:"metadata,omitempty"`
// Required: Alias/DNS that points to the service
// Can be host or host:port
// host and port are combined to follow the net/url URL struct
Host string `json:"host"`
// Optional: Path that the router watches for, to route traffic for to the service
Path string `json:"path,omitempty"`
// the name of the service that this route points to
ServiceName string `json:"serviceName"`
}
// RouteList is a collection of Routes.
type RouteList struct {
kapi.TypeMeta `json:",inline"`
kapi.ListMeta `json:"metadata,omitempty"`
Items []Route `json:"items"`
}