These functions allow to create, get or delete an Object Store.
◆ objStoreConfig_Init()
◆ js_CreateObjectStore()
Creates an object store with a given configuration.
Bucket names are restricted to this set of characters: A-Z
, a-z
, 0-9
, _
and -
.
- Note
- The returned objStore object needs to be destroyed using objStore_Destroy when no longer needed to free allocated memory. This is different from deleting an object store from the server using the js_DeleteObjectStore API.
- Parameters
-
new_obs | the location where to store the pointer to the objStore object. |
js | the pointer to the jsCtx object. |
cfg | the pointer to the objStoreConfig configuration information used to create the objStore object. |
◆ js_UpdateObjectStore()
Updates an object store with a given configuration.
Bucket names are restricted to this set of characters: A-Z
, a-z
, 0-9
, _
and -
.
- Note
- If the object store with given name does not exist, this will return NATS_NOT_FOUND.
-
The returned objStore object needs to be destroyed using objStore_Destroy when no longer needed to free allocated memory. This is different from deleting an object store from the server using the js_DeleteObjectStore API.
- Parameters
-
new_obs | the location where to store the pointer to the objStore object. |
js | the pointer to the jsCtx object. |
cfg | the pointer to the objStoreConfig configuration information used to create the objStore object. |
◆ js_ObjectStore()
This call is when the user wants to use an existing object store. If the store does not already exists, an error is returned.
Bucket names are restricted to this set of characters: A-Z
, a-z
, 0-9
, _
and -
.
- Note
- The returned objStore object needs to be destroyed using objStore_Destroy when no longer needed to free allocated memory. This is different from deleting an object store from the server using the js_DeleteObjectStore API.
- Parameters
-
new_obs | the location where to store the pointer to the objStore object. |
js | the pointer to the jsCtx object. |
bucket | the name of the bucket of the existing object store. |
◆ js_ObjectStoreNames()
◆ objStoreNamesList_Destroy()
Releases memory allocated for this list of object store names.
- Warning
- All strings contained in the list will become invalid after this call.
- Parameters
-
◆ js_ObjectStoreStatuses()
◆ objStoreStatusesList_Destroy()
Releases memory allocated for this list of object store statuses.
- Warning
- All objStoreStatus objects contained in the list will become invalid after this call.
- Parameters
-
◆ js_DeleteObjectStore()
This will delete the object store with the bucket
name.
Bucket names are restricted to this set of characters: A-Z
, a-z
, 0-9
, _
and -
.
- Parameters
-
js | the pointer to the jsCtx object. |
bucket | the name of the bucket of the existing object store. |