package krb

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

An instantiation of Persistent_connection for creating persistent kerberized rpc connections

include Persistent_connection.S with type conn = Async.Rpc.Connection.t
include Persistent_connection_kernel.S with type conn = Async.Rpc.Connection.t
type t
val sexp_of_t : t -> Sexplib0.Sexp.t

A connection, perhaps embellished with additional information upon connection.

module Event : sig ... end
val connected : t -> conn Async_kernel.Deferred.t

connected returns the first available connection from the time it is called. When currently connected, the returned deferred is already determined. If closed has been called, then the returned deferred is never determined.

val connected_or_failed_to_connect : t -> conn Core.Or_error.t Async_kernel.Deferred.t

connected_or_failed_to_connect is immediately determined as Ok _ if t is already connected. Otherwise it becomes determined the next time t becomes connected or fails to connect or when t is closed.

val current_connection : t -> conn option

The current connection, if any.

val server_name : t -> string

close t closes the current connection and stops it from trying to reconnect. After the deferred it returns becomes determined, the last connection has been closed and no others will be attempted.

Note: no close calls are ever generated internally in response to the connection being closed by the other side.

val close : t -> unit Async_kernel.Deferred.t

close t closes the connection. The returned deferred becomes determined once any resources needed to maintain the connection have been released.

val is_closed : t -> bool

is_closed t returns true if close has ever been called (even if the returned deferred has not yet been fulfilled).

Note that some modules implementing Closable may call close internally upon noticing that the connection was closed by the other side. The interface of such a module ought to say that this is the case.

val close_finished : t -> unit Async_kernel.Deferred.t

close_finished t becomes determined at the same time as the result of the first call to close. close_finished differs from close in that it does not have the side effect of initiating a close.

val close_when_current_connection_is_closed : t -> unit

close_when_current_connection_is_closed t causes the persistent connection to not reconnect if the current connection closes or if it is not currently connected. It does not close any active connection.

val create : server_name:string -> ?log:Async.Log.t -> ?on_event:('address Event.t -> unit Async.Deferred.t) -> ?retry_delay:(unit -> Core.Time.Span.t) -> ?random_state:[ `Non_random | `State of Core.Random.State.t ] -> ?time_source:Async.Time_source.t -> connect:('address -> conn Core.Or_error.t Async.Deferred.t) -> address:(module Persistent_connection_kernel.Address with type t = 'address) -> (unit -> 'address Core.Or_error.t Async.Deferred.t) -> t
type 'a persistent_connection_args = server_name:string -> ?log:Async.Log.t -> ?on_event:(Core.Host_and_port.t Event.t -> unit Async.Deferred.t) -> ?retry_delay:(unit -> Core.Time.Span.t) -> 'a

Arguments passed through to Persistent_connection.Rpc.create. See Persistent_connection for documentation.

val create' : (?max_message_size:int -> ?handshake_timeout:Core.Time.Span.t -> ?heartbeat_config:Async.Rpc.Connection.Heartbeat_config.t -> krb_mode:Mode.Client.t -> ?bind_to_address:Async.Unix.Inet_addr.t -> ?implementations: (Server_principal.t -> _ Async.Rpc.Connection.Client_implementations.t) -> ?description:Core.Info.t -> ?cred_cache:Cred_cache.t -> authorize:Authorize.t -> (unit -> Core.Host_and_port.t Async.Deferred.Or_error.t) -> t) persistent_connection_args
OCaml

Innovation. Community. Security.