VertexCacheSdk (vertexcache_sdk v1.0.0)

View Source

VertexCacheSdk is the main entry point for interacting with the VertexCache server.

It provides methods to perform cache operations such as GET, SET, and DEL, and abstracts away the underlying TCP transport details.

This SDK handles encryption (symmetric/asymmetric), TLS negotiation, authentication, and framing of commands and responses.

Summary

Types

t()

@type t() :: %VertexCacheSdk{connector: VertexCacheSdk.Comm.ClientConnector.t()}

Functions

close(vertex_cache_sdk)

@spec close(t()) :: :ok

del(vertex_cache_sdk, key)

@spec del(t(), String.t()) :: VertexCacheSdk.Model.CommandResult.t()

get(vertex_cache_sdk, key)

@spec get(t(), String.t()) :: VertexCacheSdk.Model.GetResult.t()

get_by_secondary_index(vertex_cache_sdk, idx1)

@spec get_by_secondary_index(t(), String.t()) :: VertexCacheSdk.Model.GetResult.t()

get_by_tertiary_index(vertex_cache_sdk, idx2)

@spec get_by_tertiary_index(t(), String.t()) :: VertexCacheSdk.Model.GetResult.t()

is_connected?(vertex_cache_sdk)

@spec is_connected?(t()) :: boolean()

open_connection(opts)

@spec open_connection(VertexCacheSdk.Model.ClientOption.t()) ::
  {:ok, t()} | {:error, VertexCacheSdkException.t()}

ping(vertex_cache_sdk)

@spec ping(t()) :: VertexCacheSdk.Model.CommandResult.t()

set(vertex_cache_sdk, key, value)

@spec set(t(), String.t(), String.t()) :: VertexCacheSdk.Model.CommandResult.t()

set(vertex_cache_sdk, key, value, idx1)

@spec set(t(), String.t(), String.t(), String.t()) ::
  VertexCacheSdk.Model.CommandResult.t()

set(vertex_cache_sdk, key, value, idx1, idx2)

@spec set(t(), String.t(), String.t(), String.t(), String.t()) ::
  VertexCacheSdk.Model.CommandResult.t()