dagger/dsl/engine

Types

pub type Opts {
  Opts(
    key: option.Option(String),
    use_default_policy: option.Option(Bool),
  )
}

Constructors

Values

pub fn cache_entry_set_id(
  parent: types.EngineCacheEntrySet,
) -> types.EngineCacheEntrySet

A unique identifier for this EngineCacheEntrySet.

pub fn cache_id(parent: types.EngineCache) -> types.EngineCache

A unique identifier for this EngineCache.

pub fn clients(
  parent: types.Engine,
  client client: types.Client,
  then handler: fn(Result(List(String), types.QueryError)) -> a,
) -> a

The list of connected client IDs

pub fn disk_space_bytes(
  parent: types.EngineCacheEntrySet,
  client client: types.Client,
  then handler: fn(Result(Int, types.QueryError)) -> a,
) -> a

The total disk space used by the cache entries in this set.

pub fn engine() -> types.Engine
pub fn engine_id(parent: types.Engine) -> types.Engine

A unique identifier for this Engine.

pub fn entries(
  parent: types.EngineCacheEntrySet,
  select select: fn(types.EngineCacheEntry) -> List(types.Field),
  client client: types.Client,
  then handler: fn(
    Result(List(types.EngineCacheEntry), types.QueryError),
  ) -> a,
) -> a

The list of individual cache entries in the set

pub fn entry_count(
  parent: types.EngineCacheEntrySet,
  client client: types.Client,
  then handler: fn(Result(Int, types.QueryError)) -> a,
) -> a

The number of cache entries in this set.

pub fn entry_set(
  parent: types.EngineCache,
  with with_fn: fn(Opts) -> Opts,
) -> types.EngineCacheEntrySet

The current set of entries in the cache

pub fn key(opts: Opts, val: String) -> Opts
pub fn local_cache(parent: types.Engine) -> types.EngineCache

The local (on-disk) cache for the Dagger engine

pub fn max_used_space(
  parent: types.EngineCache,
  client client: types.Client,
  then handler: fn(Result(Int, types.QueryError)) -> a,
) -> a

The maximum bytes to keep in the cache without pruning.

pub fn min_free_space(
  parent: types.EngineCache,
  client client: types.Client,
  then handler: fn(Result(Int, types.QueryError)) -> a,
) -> a

The target amount of free disk space the garbage collector will attempt to leave.

pub fn name(
  parent: types.Engine,
  client client: types.Client,
  then handler: fn(Result(String, types.QueryError)) -> a,
) -> a

The name of the engine instance.

pub fn none(opts: Opts) -> Opts
pub fn prune(
  parent: types.EngineCache,
  with with_fn: fn(Opts) -> Opts,
  client client: types.Client,
  then handler: fn(Result(Nil, types.QueryError)) -> a,
) -> a

Prune the cache of releaseable entries

pub fn reserved_space(
  parent: types.EngineCache,
  client client: types.Client,
  then handler: fn(Result(Int, types.QueryError)) -> a,
) -> a

The minimum amount of disk space this policy is guaranteed to retain.

pub fn target_space(
  parent: types.EngineCache,
  client client: types.Client,
  then handler: fn(Result(Int, types.QueryError)) -> a,
) -> a

The target number of bytes to keep when pruning.

pub fn use_default_policy(opts: Opts, val: Bool) -> Opts
Search Document