livery_client_cookie_store behaviour (livery v0.4.2)
View SourceBehaviour for the cookie jar's backing store.
livery_client_cookie keeps no cookies of its own; it reads and writes
them through this behaviour. The default, livery_client_cookie_store_ets,
holds them in a public ETS table created by the jar constructor and shared
across the concurrent request processes that run the client. Implement the
four callbacks to back a jar with something else (a shared process, an
external cache); the jar stays in-memory and per-jar either way.
Cookies and keys are opaque to the store: it persists and returns them without looking inside.
init(Opts) -> Store- build the store from thejar/1opts and return an opaque handle.get(Store) -> [Cookie]- every cookie currently held, in any order.put(Store, Key, Cookie) -> ok- storeCookieunderKey, replacing any cookie already there.delete(Store, Key) -> ok- forget the cookie underKey.