Add PodLogOptions versioned resource

PodLogOptions will capture options passed in to retrieve a pod's log.
This commit is contained in:
Cesar Wong 2015-04-06 12:38:55 -04:00
parent e64d7337b3
commit 6dba6aa178
8 changed files with 52 additions and 0 deletions

View File

@ -58,6 +58,7 @@ func init() {
&PersistentVolumeClaimList{},
&DeleteOptions{},
&ListOptions{},
&PodLogOptions{},
)
// Legacy names are supported
Scheme.AddKnownTypeWithName("", "Minion", &Node{})
@ -97,3 +98,4 @@ func (*PersistentVolumeClaim) IsAnAPIObject() {}
func (*PersistentVolumeClaimList) IsAnAPIObject() {}
func (*DeleteOptions) IsAnAPIObject() {}
func (*ListOptions) IsAnAPIObject() {}
func (*PodLogOptions) IsAnAPIObject() {}

View File

@ -1249,6 +1249,17 @@ type ListOptions struct {
ResourceVersion string
}
// PodLogOptions is the query options for a Pod's logs REST call
type PodLogOptions struct {
TypeMeta
// Container for which to return logs
Container string
// If true, follow the logs for the pod
Follow bool
}
// Status is a return value for calls that don't return other objects.
// TODO: this could go in apiserver, but I'm including it here so clients needn't
// import both.

View File

@ -65,6 +65,7 @@ func init() {
&PersistentVolumeClaimList{},
&DeleteOptions{},
&ListOptions{},
&PodLogOptions{},
)
// Future names are supported
api.Scheme.AddKnownTypeWithName("v1beta1", "Node", &Minion{})
@ -104,3 +105,4 @@ func (*PersistentVolumeClaim) IsAnAPIObject() {}
func (*PersistentVolumeClaimList) IsAnAPIObject() {}
func (*DeleteOptions) IsAnAPIObject() {}
func (*ListOptions) IsAnAPIObject() {}
func (*PodLogOptions) IsAnAPIObject() {}

View File

@ -1104,6 +1104,17 @@ type ListOptions struct {
ResourceVersion string `json:"resourceVersion" description:"when specified with a watch call, shows changes that occur after that particular version of a resource; defaults to changes from the beginning of history"`
}
// PodLogOptions is the query options for a Pod's logs REST call
type PodLogOptions struct {
TypeMeta `json:",inline"`
// Container for which to return logs
Container string `json:"container,omitempty" description:"the container for which to stream logs; defaults to only container if there is one container in the pod"`
// If true, follow the logs for the pod
Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"`
}
// Status is a return value for calls that don't return other objects.
// TODO: this could go in apiserver, but I'm including it here so clients needn't
// import both.

View File

@ -65,6 +65,7 @@ func init() {
&PersistentVolumeClaimList{},
&DeleteOptions{},
&ListOptions{},
&PodLogOptions{},
)
// Future names are supported
api.Scheme.AddKnownTypeWithName("v1beta2", "Node", &Minion{})
@ -104,3 +105,4 @@ func (*PersistentVolumeClaim) IsAnAPIObject() {}
func (*PersistentVolumeClaimList) IsAnAPIObject() {}
func (*DeleteOptions) IsAnAPIObject() {}
func (*ListOptions) IsAnAPIObject() {}
func (*PodLogOptions) IsAnAPIObject() {}

View File

@ -1118,6 +1118,17 @@ type ListOptions struct {
ResourceVersion string `json:"resourceVersion" description:"when specified with a watch call, shows changes that occur after that particular version of a resource; defaults to changes from the beginning of history"`
}
// PodLogOptions is the query options for a Pod's logs REST call
type PodLogOptions struct {
TypeMeta `json:",inline"`
// Container for which to return logs
Container string `json:"container,omitempty" description:"the container for which to stream logs; defaults to only container if there is one container in the pod"`
// If true, follow the logs for the pod
Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"`
}
// Status is a return value for calls that don't return other objects.
// TODO: this could go in apiserver, but I'm including it here so clients needn't
// import both.

View File

@ -59,6 +59,7 @@ func init() {
&PersistentVolumeClaimList{},
&DeleteOptions{},
&ListOptions{},
&PodLogOptions{},
)
// Legacy names are supported
api.Scheme.AddKnownTypeWithName("v1beta3", "Minion", &Node{})
@ -98,3 +99,4 @@ func (*PersistentVolumeClaim) IsAnAPIObject() {}
func (*PersistentVolumeClaimList) IsAnAPIObject() {}
func (*DeleteOptions) IsAnAPIObject() {}
func (*ListOptions) IsAnAPIObject() {}
func (*PodLogOptions) IsAnAPIObject() {}

View File

@ -1236,6 +1236,17 @@ type ListOptions struct {
ResourceVersion string `json:"resourceVersion" description:"when specified with a watch call, shows changes that occur after that particular version of a resource; defaults to changes from the beginning of history"`
}
// PodLogOptions is the query options for a Pod's logs REST call
type PodLogOptions struct {
TypeMeta `json:",inline"`
// Container for which to return logs
Container string `json:"container,omitempty" description:"the container for which to stream logs; defaults to only container if there is one container in the pod"`
// If true, follow the logs for the pod
Follow bool `json:"follow,omitempty" description:"follow the log stream of the pod; defaults to false"`
}
// Status is a return value for calls that don't return other objects.
type Status struct {
TypeMeta `json:",inline"`