TLS configuration for KubeMQ gRPC connections.
Maps keyword options to GRPC.Credential SSL options.
TLS (server authentication only)
{:ok, client} = KubeMQ.Client.start_link(
address: "kubemq.example.com:50000",
client_id: "my-app",
tls: [cacertfile: "/path/to/ca.pem"]
)mTLS (mutual authentication)
{:ok, client} = KubeMQ.Client.start_link(
address: "kubemq.example.com:50000",
client_id: "my-app",
tls: [
cacertfile: "/path/to/ca.pem",
certfile: "/path/to/client.pem",
keyfile: "/path/to/client-key.pem"
]
)
Summary
Functions
Returns true if the TLS config includes client certificates (mTLS).
Build a GRPC.Credential from TLS keyword options.
Build SSL options from the TLS keyword list for GRPC.Credential.new/1.
Types
Functions
Returns true if the TLS config includes client certificates (mTLS).
@spec to_credential(keyword()) :: GRPC.Credential.t() | nil
Build a GRPC.Credential from TLS keyword options.
Returns nil if tls_opts is nil (plaintext connection).
@spec to_credential(keyword() | nil, String.t() | nil) :: GRPC.Credential.t() | nil
Build SSL options from the TLS keyword list for GRPC.Credential.new/1.
Returns a keyword list suitable for :ssl.connect/3.