Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options to client.Delete() #94

Merged
merged 2 commits into from
Sep 10, 2018

Commits on Sep 6, 2018

  1. Add options to client.Delete

    Allows Delete requests to carry options like GracePeriodSeconds,
    Preconditions, and PropagationPolicy.
    
    To use the default options, call Delete with the same signature as
    before:
    
    client.Delete(context.TODO(), obj)
    
    Delete options are passed to the request using the functional options
    pattern. This Delete call sets a GracePeriodSeconds:
    
    client.Delete(context.TODO(), obj, client.GracePeriodSeconds(1))
    
    Multiple options can be set:
    
    client.Delete(context.TODO(), obj,
      client.GracePeriodSeconds(1),
      client.PropagationPolicy(metav1.DeletePropagationForeground))
    
    The fake client doesn't yet implement delete options like propagation,
    so keep that in mind when writing tests.
    grantr committed Sep 6, 2018
    Configuration menu
    Copy the full SHA
    7571dae View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bea55bf View commit details
    Browse the repository at this point in the history