Skip to content

Commit fd4ab76

Browse files
committed
Add max_tries kwarg to put!, delete! and update!
1 parent 07dd915 commit fd4ab76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/simpleapi.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function put!(ctx::KuberContext, v::T) where {T<:SwaggerModel}
9494
put!(ctx, Symbol(vjson["kind"]), vjson)
9595
end
9696

97-
function put!(ctx::KuberContext, O::Symbol, d::Dict{String,Any})
97+
function put!(ctx::KuberContext, O::Symbol, d::Dict{String,Any}; max_tries::Int=1)
9898
ctx.initialized || set_api_versions!(ctx)
9999

100100
apictx = _get_apictx(ctx, O, get(d, "apiVersion", nothing))
@@ -114,7 +114,7 @@ function delete!(ctx::KuberContext, v::T; kwargs...) where {T<:SwaggerModel}
114114
delete!(ctx, Symbol(kind), name; apiversion=get(vjson, "apiVersion", nothing), kwargs...)
115115
end
116116

117-
function delete!(ctx::KuberContext, O::Symbol, name::String; apiversion::Union{String,Nothing}=nothing, kwargs...)
117+
function delete!(ctx::KuberContext, O::Symbol, name::String; apiversion::Union{String,Nothing}=nothing, max_tries::Int=1, kwargs...)
118118
ctx.initialized || set_api_versions!(ctx)
119119
apictx = _get_apictx(ctx, O, apiversion)
120120

@@ -137,7 +137,7 @@ function update!(ctx::KuberContext, v::T, patch, patch_type) where {T<:SwaggerMo
137137
update!(ctx, Symbol(kind), name, patch, patch_type; apiversion=get(vjson, "apiVersion", nothing))
138138
end
139139

140-
function update!(ctx::KuberContext, O::Symbol, name::String, patch, patch_type; apiversion::Union{String,Nothing}=nothing)
140+
function update!(ctx::KuberContext, O::Symbol, name::String, patch, patch_type; apiversion::Union{String,Nothing}=nothing, max_tries::Int=1)
141141
ctx.initialized || set_api_versions!(ctx)
142142

143143
apictx = _get_apictx(ctx, O, apiversion)

0 commit comments

Comments
 (0)