Documentation ¶
Index ¶
- Constants
- func CascadeDeleteOptions(gracePeriodSeconds int64) *metav1.DeleteOptions
- func GetClusterConfig() (*rest.Config, error)
- func IsKubernetesResourceAlreadyExistError(err error) bool
- func IsKubernetesResourceNotFoundError(err error) bool
- func JobListOpt(clusterName string) metav1.ListOptions
- func LabelsForJob(jobName string) map[string]string
- func MustNewApiExtensionsClient() apiextensionsclient.Interface
- func MustNewKubeClient() kubernetes.Interface
- type MxJobClient
- type MxJobRestClient
- func (c *MxJobRestClient) Client() *http.Client
- func (c *MxJobRestClient) Create(ns string, j *spec.MxJob) (*spec.MxJob, error)
- func (c *MxJobRestClient) Delete(ns, name string) (*spec.MxJob, error)
- func (c *MxJobRestClient) Get(ns, name string) (*spec.MxJob, error)
- func (c *MxJobRestClient) List(ns string) (*spec.MxJobList, error)
- func (c *MxJobRestClient) Update(ns string, j *spec.MxJob) (*spec.MxJob, error)
- func (c *MxJobRestClient) Watch(host, ns string, httpClient *http.Client, resourceVersion string) (*http.Response, error)
Constants ¶
View Source
const (
RecommendedConfigPathEnvVar = "KUBECONFIG"
)
Variables ¶
This section is empty.
Functions ¶
func CascadeDeleteOptions ¶
func CascadeDeleteOptions(gracePeriodSeconds int64) *metav1.DeleteOptions
TODO(jlewi): CascadeDeletOptions are part of garbage collection policy. Do we want to use this? See https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/
func GetClusterConfig ¶
func JobListOpt ¶
func JobListOpt(clusterName string) metav1.ListOptions
We are using internal api types for cluster related.
func LabelsForJob ¶
func MustNewApiExtensionsClient ¶
func MustNewApiExtensionsClient() apiextensionsclient.Interface
func MustNewKubeClient ¶
func MustNewKubeClient() kubernetes.Interface
Types ¶
type MxJobClient ¶
type MxJobClient interface { // Get returns a MxJob Get(ns string, name string) (*spec.MxJob, error) // Delete a MxJob Delete(ns string, name string) (*spec.MxJob, error) // List returns a list of MxJobs List(ns string) (*spec.MxJobList, error) // Create a MxJob Create(ns string, j *spec.MxJob) (*spec.MxJob, error) // Update a MxJob. Update(ns string, j *spec.MxJob) (*spec.MxJob, error) // Watch MxJobs. Watch(host, ns string, httpClient *http.Client, resourceVersion string) (*http.Response, error) }
MXJobClient defines an interface for working with MxJob CRDs.
type MxJobRestClient ¶
type MxJobRestClient struct {
// contains filtered or unexported fields
}
MxJobRestClient uses the Kubernetes rest interface to talk to the CRD.
func NewMxJobClient ¶
func NewMxJobClient() (*MxJobRestClient, error)
func NewMxJobClientExternal ¶
func NewMxJobClientExternal(config *rest.Config) (*MxJobRestClient, error)
New MXJob client for out-of-cluster
func (*MxJobRestClient) Client ¶
func (c *MxJobRestClient) Client() *http.Client
HttpClient returns the http client used.
func (*MxJobRestClient) Delete ¶
func (c *MxJobRestClient) Delete(ns, name string) (*spec.MxJob, error)
Directories ¶
Path | Synopsis |
---|---|
Package election implements leader election of a set of endpoints.
|
Package election implements leader election of a set of endpoints. |
fake provides a fake implementation of MxJobClient suitable for use in testing.
|
fake provides a fake implementation of MxJobClient suitable for use in testing. |
Click to show internal directories.
Click to hide internal directories.