Packages
k8s
2.0.0-rc.5
2.8.0
2.7.0
2.6.2
2.6.1
2.6.0
2.5.0
2.4.2
2.4.1
2.4.0
2.3.0
2.2.0
2.1.1
2.1.0
2.0.3
2.0.2
2.0.1
2.0.0
2.0.0-rc.6
2.0.0-rc.5
2.0.0-rc.4
2.0.0-rc.3
2.0.0-rc.2
2.0.0-rc.1
2.0.0-rc.0
1.2.1
1.2.0
1.1.10
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.0
1.0.0-rc1
0.5.2
0.5.1
0.5.0
0.5.0-rc.2
0.5.0-rc.1
0.4.0
0.3.2
0.3.1
0.3.0
0.2.13
0.2.12
0.2.11
0.2.10
0.2.9
0.2.8
0.2.7
retired
0.2.6
0.2.5
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.3
Kubernetes API Client for Elixir
Current section
Files
Jump to
Current section
Files
lib/k8s/conn/request_options.ex
defprotocol K8s.Conn.RequestOptions do
@moduledoc """
Encapsulates HTTP request options for an authentication provider.
"""
@fallback_to_any true
@typedoc """
HTTP Request options
"""
@type t :: %__MODULE__{headers: keyword(), ssl_options: keyword()}
defstruct headers: [], ssl_options: []
@typedoc """
`generate/1` response type
"""
@type generate_t :: {:ok, t} | {:error, K8s.Conn.Error.t() | atom}
@spec generate(any()) :: generate_t()
def generate(auth)
end
defimpl K8s.Conn.RequestOptions, for: Map do
@spec generate(map()) :: K8s.Conn.RequestOptions.generate_t()
def generate(map), do: {:ok, struct(K8s.Conn.RequestOptions, map)}
end
defimpl K8s.Conn.RequestOptions, for: Any do
@spec generate(any()) :: K8s.Conn.RequestOptions.generate_t()
def generate(_), do: {:ok, %K8s.Conn.RequestOptions{}}
end