package dns

  1. Overview
  2. Docs
type rank =
  1. | ZoneFile
  2. | ZoneTransfer
  3. | AuthoritativeAnswer
  4. | AuthoritativeAuthority
  5. | ZoneGlue
  6. | NonAuthoritativeAnswer
  7. | Additional
val pp_rank : rank Fmt.t
val compare_rank : rank -> rank -> int
type t
val empty : int -> t
val size : t -> int
val capacity : t -> int
val pp : t Fmt.t
type entry = [
  1. | `Entry of Dns.Rr_map.b
  2. | `No_data of [ `raw ] Domain_name.t * Dns.Soa.t
  3. | `No_domain of [ `raw ] Domain_name.t * Dns.Soa.t
  4. | `Serv_fail of [ `raw ] Domain_name.t * Dns.Soa.t
]
val pp_entry : entry Fmt.t
val get : t -> int64 -> [ `raw ] Domain_name.t -> 'a Dns.Rr_map.key -> (entry, [ `Cache_miss | `Cache_drop ]) result

get lru_cache timestamp request_type name

val set : t -> int64 -> [ `raw ] Domain_name.t -> 'a Dns.Rr_map.key -> rank -> entry -> unit

set lru_cache timestamp request_type name rank value

OCaml

Innovation. Community. Security.