func (c *podGroups) Watch(opts metav1.ListOptions) (watch.Interface, error) {
	var timeout time.Duration
	if opts.TimeoutSeconds != nil {
		timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
	}
	opts.Watch = true
	return c.client.Get().
		Namespace(c.ns).
		Resource("podgroups").
		VersionedParams(&opts, scheme.ParameterCodec).
		Timeout(timeout).
		Watch()
}
Watch returns a watch.Interface that watches the requested podGroups.
package v1
import (
	"time"
	v1 "github.com/tenstack/batch-scheduler/pkg/apis/podgroup/v1"
	scheme "github.com/tenstack/batch-scheduler/pkg/generated/clientset/versioned/scheme"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	types "k8s.io/apimachinery/pkg/types"
	watch "k8s.io/apimachinery/pkg/watch"
	rest "k8s.io/client-go/rest"
)
type PodGroupsGetter interface {
	PodGroups(namespace string) PodGroupInterface
}
type PodGroupInterface interface {
	Create(*v1.PodGroup) (*v1.PodGroup, error)
	Update(*v1.PodGroup) (*v1.PodGroup, error)
	UpdateStatus(*v1.PodGroup) (*v1.PodGroup, error)
	Delete(name string, options *metav1.DeleteOptions) error
	DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
	Get(name string, options metav1.GetOptions) (*v1.PodGroup, error)
	List(opts metav1.ListOptions) (*v1.PodGroupList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.PodGroup, err error)
	PodGroupExpansion
}
type podGroups struct {
	client rest.Interface
	ns     string
}
func newPodGroups(c *BatchV1Client, namespace string) *podGroups {
	return &podGroups{
		client: c.RESTClient(),
		ns:     namespace,
	}
}
func (c *podGroups) Get(name string, options metav1.GetOptions) (result *v1.PodGroup, err error) {
	result = &v1.PodGroup{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("podgroups").
		Name(name).
		VersionedParams(&options, scheme.ParameterCodec).
		Do().
		Into(result)
	return
}
func (c *podGroups) List(opts metav1.ListOptions) (result *v1.PodGroupList, err error) {
	var timeout time.Duration
	if opts.TimeoutSeconds != nil {
		timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
	}
	result = &v1.PodGroupList{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("podgroups").
		VersionedParams(&opts, scheme.ParameterCodec).
		Timeout(timeout).
		Do().
		Into(result)
	return
}