Documentation
¶
Overview ¶
Package tasks contains the client for working with Kf Tasks.
Index ¶
- Variables
- func ConditionDeleted(_ *v1alpha1.Task, apiErr error) (bool, error)
- func ConditionReadyTrue(obj *v1alpha1.Task, err error) (bool, error)
- func ExtractConditions(obj *v1alpha1.Task) (extracted []apis.Condition)
- func ObservedGenerationMatchesGeneration(obj *v1alpha1.Task) bool
- type Client
- type ClientExtension
- type ConditionFuncE
- type Merger
- type Mutator
- type Predicate
- type ResourceInfo
Constants ¶
This section is empty.
Variables ¶
var (
ConditionReady = apis.ConditionType(v1alpha1.TaskConditionSucceeded)
)
Functions ¶
func ConditionDeleted ¶
ConditionDeleted is a ConditionFuncE that succeeds if the error returned by the cluster was a not found error.
func ConditionReadyTrue ¶
ConditionReadyTrue is a ConditionFuncE that waits for Condition{Ready v1alpha1.TaskConditionSucceeded } to become true and fails with an error if the condition becomes false.
func ExtractConditions ¶
ExtractConditions converts the native condition types into an apis.Condition array with the Type, Status, Reason, and Message fields intact.
func ObservedGenerationMatchesGeneration ¶
ObservedGenerationMatchesGeneration is a predicate that returns true if the object's ObservedGeneration matches the genration of the object.
Types ¶
type Client ¶
type Client interface {
Create(ctx context.Context, namespace string, obj *v1alpha1.Task) (*v1alpha1.Task, error)
Transform(ctx context.Context, namespace string, name string, transformer Mutator) (*v1alpha1.Task, error)
Get(ctx context.Context, namespace string, name string) (*v1alpha1.Task, error)
Delete(ctx context.Context, namespace string, name string) error
List(ctx context.Context, namespace string) ([]v1alpha1.Task, error)
Upsert(ctx context.Context, namespace string, newObj *v1alpha1.Task, merge Merger) (*v1alpha1.Task, error)
WaitFor(ctx context.Context, namespace string, name string, interval time.Duration, condition Predicate) (*v1alpha1.Task, error)
// Utility functions
WaitForDeletion(ctx context.Context, namespace string, name string, interval time.Duration) (*v1alpha1.Task, error)
WaitForConditionReadyTrue(ctx context.Context, namespace string, name string, interval time.Duration) (*v1alpha1.Task, error)
// ClientExtension can be used by the developer to extend the client.
ClientExtension
}
Client is the interface for interacting with v1alpha1.Task types as Task CF style objects.
func NewClient ¶
func NewClient(kclient cv1alpha1.TasksGetter) Client
NewClient creates a new client for Service Instances.
type ClientExtension ¶
type ClientExtension interface {
}
ClientExtension holds additional functions that should be exposed by client.
type ConditionFuncE ¶
ConditionFuncE is a callback used by waitForE. Done should be set to true once the condition succeeds and shouldn't be called anymore. The error will be passed back to the user.
This function MAY retrieve a nil instance and an apiErr. It's up to the function to decide how to handle the apiErr.
type ResourceInfo ¶
type ResourceInfo struct{}
func NewResourceInfo ¶
func NewResourceInfo() *ResourceInfo
NewResourceInfo returns a new instance of ResourceInfo
func (*ResourceInfo) FriendlyName ¶
func (*ResourceInfo) FriendlyName() string
FriendlyName gets the user-facing name of the resource.
func (*ResourceInfo) GroupVersionKind ¶
func (*ResourceInfo) GroupVersionKind(context.Context) schema.GroupVersionKind
GroupVersionKind gets the GVK struct for the resource.
func (*ResourceInfo) GroupVersionResource ¶
func (*ResourceInfo) GroupVersionResource(context.Context) schema.GroupVersionResource
GroupVersionResource gets the GVR struct for the resource.
func (*ResourceInfo) Namespaced ¶
func (*ResourceInfo) Namespaced() bool
Namespaced returns true if the type belongs in a namespace.