Skip to content

Commit

Permalink
add types for endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
wlan0 committed Dec 2, 2017
1 parent 6e70b87 commit 36c90b2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
18 changes: 12 additions & 6 deletions types/endpoints.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package types

/*type EndpointWrapper struct {
type EndpointWrapper struct {
Endpoint Endpoint `json:"endpoint,omitempty"`
}

Expand All @@ -15,8 +15,14 @@ type EndpointSubset struct {
}

type EndpointAddress struct {
IP string
Hostname string
Nodename *string
Target
}*/
IP string `json:"ip,omitempty"`
Hostname string `json:"hostname,omitempty"`
Nodename *string `json:"node,omitempty"`
Target *ObjectReference `json:"target,omitempty"`
}

type EndpointPort struct {
Name string `json:"name,omitempty"`
Port int32 `json:"port,omitempty"`
Protocol Protocol `json:"protocol,omitempty"`
}
11 changes: 11 additions & 0 deletions types/objectRef.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package types

type ObjectReference struct {
Kind string `json:"kind,omitempty"`
Namespace string `json:"namespace,omitempty"`
Name string `json:"name,omitempty"`
UID string `json:"uid,omitempty"`
APIVersion string `json:"version,omitempty"`
ResourceVersion string `json:"resource_version,omitempty"`
FieldPath string `json:"field_path,omitempty"`
}

0 comments on commit 36c90b2

Please sign in to comment.