View Source Gnat.Jetstream.API.Object (gnat v1.9.0)
API for interacting with the JetStream Object Store
Learn more about Object Store: https://docs.nats.io/nats-concepts/jetstream/obj_store
Link to this section Summary
Functions
Returns true if the provided stream is an Object bucket, false otherwise
Returns a list of all Object buckets
Link to this section Types
Specs
bucket_opt() :: {:description, String.t()} | {:max_bucket_size, integer()} | {:max_chunk_size, integer()} | {:placement, Gnat.Jetstream.API.Stream.placement()} | {:replicas, non_neg_integer()} | {:storage, :file | :memory} | {:ttl, non_neg_integer()}
Specs
list_option() :: {:show_deleted, boolean()}
Link to this section Functions
Specs
create_bucket(Gnat.t(), String.t(), [bucket_opt()]) :: {:ok, Gnat.Jetstream.API.Stream.info()} | {:error, any()}
Specs
Specs
Specs
Specs
info(Gnat.t(), String.t(), String.t()) :: {:ok, Gnat.Jetstream.API.Object.Meta.t()} | {:error, any()}
Specs
Returns true if the provided stream is an Object bucket, false otherwise
Parameters
stream_name
- the stream name to test
Specs
list(Gnat.t(), String.t(), [list_option()]) :: {:error, any()} | {:ok, [Gnat.Jetstream.API.Object.Meta.t()]}
Specs
Returns a list of all Object buckets
Specs
put(Gnat.t(), String.t(), String.t(), File.io_device()) :: {:ok, Gnat.Jetstream.API.Object.Meta.t()} | {:error, any()}