std.lib.resource

*active*

dynamic

*alias*

dynamic

*namespace*

dynamic

*registry*

dynamic

+type+

res

(res type)(res type config)(res type input config)(res type variant input config)(res mode type variant key config)

res-access-get

added in 3.0

(res-access-get mode type variant key)

access function for active resource

res-access-set

added in 3.0

(res-access-set mode type variant key entry)

access set function for active resource

res-api-fn

added in 3.0

(res-api-fn res-call extra post default)

helper function to create user friendly calls

res-api-tmpl

(res-api-tmpl [sym res-sym config])

res-base

added in 3.0

(res-base mode type variant key config)

gets or sets a reosurce

res-call-fn

added in 3.0

(res-call-fn f)

helper function for res-apifn

res-key

added in 3.0

(res-key mode type variant input & [args])

gets a resource key

(res-key :shared :hara/concurrent.atom.executor :default {:id :hello}) => :hello

res-path

added in 3.0

(res-path mode type variant input)

gets the resource path

(res-path :shared :hara/concurrent.atom.executor :default {:id :hello}) => ’(:shared :hara/concurrent.atom.executor :default :hello)

res-restart

added in 3.0

(res-restart mode type variant key)

starts and stops current resource

res-setup

added in 3.0

(res-setup type variant config)

creates and starts a resource

res-start

added in 3.0

(res-start mode type variant key config)

start methods for resource

res-stop

added in 3.0

(res-stop mode type variant key)

stop method for resource

res-teardown

added in 3.0

(res-teardown type variant instance)

shutsdown a resource

res:active

added in 3.0

(res:active)(res:active type)(res:active type variant)

gets all active resources

(res:active)

res:exists?

(res:exists? type)(res:exists? type input)(res:exists? type variant input)(res:exists? mode type variant key)

res:mode

added in 3.0

(res:mode type)(res:mode type variant)

gets the default mode of a resource

(res:mode :hara/concurrent.atom.executor) => :global

(res:mode :hara/concurrent.atom.executor :std.concurrent.print) => :global

res:path

(res:path type)(res:path type input)(res:path type variant input)(res:path mode type variant key)

res:restart

(res:restart type)(res:restart type input)(res:restart type variant input)(res:restart mode type variant key)

res:set

(res:set type instance)(res:set type input instance)(res:set type variant input instance)(res:set mode type variant key instance)

res:spec-add

added in 3.0

(res:spec-add {:keys [type], :as spec})

adds a new resource spec

res:spec-get

added in 3.0

(res:spec-get type)

retrieves a resource spec

(res:spec-get :hara/concurrent.atom.executor) => map?

res:spec-list

added in 3.0

(res:spec-list)

lists all available specs

(res:spec-list)

res:spec-remove

added in 3.0

(res:spec-remove type)

removes the resource spec

res:start

(res:start type)(res:start type config)(res:start type input config)(res:start type variant input config)(res:start mode type variant key config)

res:stop

(res:stop type)(res:stop type input)(res:stop type variant input)(res:stop mode type variant key)

res:variant-add

added in 3.0

(res:variant-add type {:keys [id alias], :as spec})

adds a spec variant

res:variant-get

added in 3.0

(res:variant-get type)(res:variant-get type id)

gets a new variant

res:variant-list

added in 3.0

(res:variant-list)(res:variant-list type)

retrieves a list of variants to the spec

(res:variant-list :hara/concurrent.atom.executor) => coll?

res:variant-remove

added in 3.0

(res:variant-remove type id)

removes a spec variant