Loading Makefile +4 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ OPENSSL_PATH ?= . CC ?= gcc OPTIMIZE = -O3 SYSTEM_TEST_HOST ?= \"localhost\" WARN = -Wall -Wextra -Wstrict-prototypes -Wcast-align -pedantic -Wno-missing-field-initializers -Werror=strict-prototypes WARN = -Wall -Wextra -Werror -Wstrict-prototypes -Wcast-align -pedantic -Wno-missing-field-initializers -Werror=strict-prototypes CDEFS += -D_POSIX_C_SOURCE=199309L -D_C99_SOURCE=1 -DSYSTEM_TEST_HOST=${SYSTEM_TEST_HOST} CFLAGS += -std=c99 -fPIC -g $(WARN) $(CDEFS) $(OPTIMIZE) LDFLAGS += -lm -L${OPENSSL_PATH}/lib -lcrypto -lssl -lpthread Loading Loading @@ -69,6 +69,7 @@ LIB_OBJS = \ $(OUT_DIR)/kinetic_session.o \ $(OUT_DIR)/kinetic_types_internal.o \ $(OUT_DIR)/kinetic_types.o \ $(OUT_DIR)/kinetic_memory.o \ $(OUT_DIR)/byte_array.o \ $(OUT_DIR)/kinetic_client.o \ $(OUT_DIR)/threadpool.o \ Loading Loading @@ -123,7 +124,7 @@ ${OUT_DIR}/%.o: ${LIB_DIR}/%.c Makefile ${PUB_INC}/%.h Makefile $(OUT_DIR)/socket99.o: $(SOCKET99)/socket99.c $(SOCKET99)/socket99.h $(CC) -c -o $@ $< $(CFLAGS) -I$(SOCKET99) $(OUT_DIR)/protobuf-c.o: $(PROTOBUFC)/protobuf-c/protobuf-c.c $(PROTOBUFC)/protobuf-c/protobuf-c.h $(CC) -c -o $@ $< -std=c99 -fPIC -g -Wall -Wno-unused-parameter $(OPTIMIZE) -I$(PROTOBUFC) $(CC) -c -o $@ $< -std=c99 -fPIC -g -Wall -Werror -Wno-unused-parameter $(OPTIMIZE) -I$(PROTOBUFC) ${OUT_DIR}/kinetic_types.o: ${LIB_DIR}/kinetic_types_internal.h $(OUT_DIR)/threadpool.o: ${LIB_DIR}/threadpool/threadpool.c ${LIB_DIR}/threadpool/threadpool.h Loading Loading @@ -268,7 +269,7 @@ stop_simulator: SYSTEST_SRC = ./test/system SYSTEST_OUT = $(BIN_DIR)/systest SYSTEST_LDFLAGS += -lm -L${OPENSSL_PATH}/lib -lssl -lcrypto $(KINETIC_LIB) -l pthread SYSTEST_WARN = -Wall -Wextra -Wstrict-prototypes -pedantic -Wno-missing-field-initializers -Werror=strict-prototypes SYSTEST_WARN = -Wall -Wextra -Werror -Wstrict-prototypes -pedantic -Wno-missing-field-initializers -Werror=strict-prototypes SYSTEST_CFLAGS += -std=c99 -fPIC -g $(SYSTEST_WARN) $(CDEFS) $(OPTIMIZE) -DTEST UNITY_INC = ./vendor/unity/src UNITY_SRC = ./vendor/unity/src/unity.c Loading config/Doxyfile +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ PROJECT_NAME = kinetic-c # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = "v0.9.1" PROJECT_NUMBER = "v0.10.0-beta" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a Loading config/VERSION +1 −1 Original line number Diff line number Diff line 0.9.1 0.10.0-beta config/project.yml +2 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ - -g - -Wall - -Wextra - -Werror - -pedantic - -Wstrict-prototypes # - -Werror=strict-prototypes Loading @@ -108,6 +109,7 @@ - -g - -Wall - -Wextra - -Werror # - -pedantic - -Wstrict-prototypes # - -Werror=strict-prototypes Loading include/kinetic_client.h +27 −17 Original line number Diff line number Diff line Loading @@ -28,11 +28,21 @@ * * @param log_file (path to log file, 'stdout' to log to STDOUT, NULL to disable logging) * @param log_level Logging level (-1:none, 0:error, 1:info, 2:verbose, 3:full) * * @return Returns a pointer to a `KineticClient`. You need to pass * this pointer to KineticClient_CreateConnection() to create * new connections. * Once you are finished will the `KineticClient`, and there * are no active connections. The pointer should be release * with KineticClient_Shutdown() */ KineticClient * KineticClient_Init(const char* log_file, int log_level); /** * @brief Performs shutdown/cleanup of the kinetic-c client lib * * @param client The pointer returned from `KineticClient_Init` * */ void KineticClient_Shutdown(KineticClient * const client); Loading @@ -51,6 +61,8 @@ void KineticClient_Shutdown(KineticClient * const client); * .connection Pointer to dynamically allocated connection which will be * populated upon establishment of a connection. * * @param client The KineticClient pointer returned from KineticClient_Init() * * @return Returns the resulting `KineticStatus`, and `session->connection` * will be populated with a session instance pointer upon success. * The client should call KineticClient_DestroyConnection() in Loading Loading @@ -84,7 +96,10 @@ KineticStatus KineticClient_NoOp(KineticSession const * const session); * * @param session The connected KineticSession to use for the operation. * @param entry Key/value entry for object to store. 'value' must * specify the data to be stored. * specify the data to be stored. If a closure is provided * this pointer must remain valid until the closure callback * is called. * * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion in another thread. Loading Loading @@ -114,6 +129,8 @@ KineticStatus KineticClient_Flush(KineticSession const * const session, * @param session The connected KineticSession to use for the operation. * @param entry Key/value entry for object to retrieve. 'value' will * be populated unless 'metadataOnly' is set to 'true'. * If a closure is provided this pointer must remain * valid until the closure callback is called. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion in another thread. Loading @@ -132,7 +149,9 @@ KineticStatus KineticClient_Get(KineticSession const * const session, * be populated unless 'metadataOnly' is set to 'true'. * The key and value fields will be populated with the * previous key and its corresponding value, according to * lexicographical byte order. * lexicographical byte order. If a closure is provided * this pointer must remain valid until the closure callback * is called. * * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback Loading @@ -152,7 +171,9 @@ KineticStatus KineticClient_GetPrevious(KineticSession const * const session, * be populated unless 'metadataOnly' is set to 'true'. * The key and value fields will be populated with the * next key and its corresponding value, according to * lexicographical byte order. * lexicographical byte order. If a closure is provided * this pointer must remain valid until the closure callback * is called. * * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback Loading Loading @@ -186,7 +207,9 @@ KineticStatus KineticClient_Delete(KineticSession const * const session, * * @param session The connected KineticSession to use for the operation * @param range KineticKeyRange specifying keys to return * @param keys ByteBufferArray to store the retrieved keys * @param keys ByteBufferArray to store the retrieved keys. If a * closure is provided, this must point to valid memory * until the closure callback is called. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion in another thread. Loading Loading @@ -255,17 +278,4 @@ KineticStatus KineticClient_P2POperation(KineticSession const * const session, */ KineticStatus KineticClient_InstantSecureErase(KineticSession const * const session); /** * @brief Updates the cluster version. * * @param clusterVersion Current cluster version. * @param newClusterVersion New cluster version. * * @return Returns the resulting KineticStatus. */ KineticStatus KineticClient_SetClusterVersion(KineticSession handle, int64_t clusterVersion, int64_t newClusterVersion); #endif // _KINETIC_CLIENT_H Loading
Makefile +4 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ OPENSSL_PATH ?= . CC ?= gcc OPTIMIZE = -O3 SYSTEM_TEST_HOST ?= \"localhost\" WARN = -Wall -Wextra -Wstrict-prototypes -Wcast-align -pedantic -Wno-missing-field-initializers -Werror=strict-prototypes WARN = -Wall -Wextra -Werror -Wstrict-prototypes -Wcast-align -pedantic -Wno-missing-field-initializers -Werror=strict-prototypes CDEFS += -D_POSIX_C_SOURCE=199309L -D_C99_SOURCE=1 -DSYSTEM_TEST_HOST=${SYSTEM_TEST_HOST} CFLAGS += -std=c99 -fPIC -g $(WARN) $(CDEFS) $(OPTIMIZE) LDFLAGS += -lm -L${OPENSSL_PATH}/lib -lcrypto -lssl -lpthread Loading Loading @@ -69,6 +69,7 @@ LIB_OBJS = \ $(OUT_DIR)/kinetic_session.o \ $(OUT_DIR)/kinetic_types_internal.o \ $(OUT_DIR)/kinetic_types.o \ $(OUT_DIR)/kinetic_memory.o \ $(OUT_DIR)/byte_array.o \ $(OUT_DIR)/kinetic_client.o \ $(OUT_DIR)/threadpool.o \ Loading Loading @@ -123,7 +124,7 @@ ${OUT_DIR}/%.o: ${LIB_DIR}/%.c Makefile ${PUB_INC}/%.h Makefile $(OUT_DIR)/socket99.o: $(SOCKET99)/socket99.c $(SOCKET99)/socket99.h $(CC) -c -o $@ $< $(CFLAGS) -I$(SOCKET99) $(OUT_DIR)/protobuf-c.o: $(PROTOBUFC)/protobuf-c/protobuf-c.c $(PROTOBUFC)/protobuf-c/protobuf-c.h $(CC) -c -o $@ $< -std=c99 -fPIC -g -Wall -Wno-unused-parameter $(OPTIMIZE) -I$(PROTOBUFC) $(CC) -c -o $@ $< -std=c99 -fPIC -g -Wall -Werror -Wno-unused-parameter $(OPTIMIZE) -I$(PROTOBUFC) ${OUT_DIR}/kinetic_types.o: ${LIB_DIR}/kinetic_types_internal.h $(OUT_DIR)/threadpool.o: ${LIB_DIR}/threadpool/threadpool.c ${LIB_DIR}/threadpool/threadpool.h Loading Loading @@ -268,7 +269,7 @@ stop_simulator: SYSTEST_SRC = ./test/system SYSTEST_OUT = $(BIN_DIR)/systest SYSTEST_LDFLAGS += -lm -L${OPENSSL_PATH}/lib -lssl -lcrypto $(KINETIC_LIB) -l pthread SYSTEST_WARN = -Wall -Wextra -Wstrict-prototypes -pedantic -Wno-missing-field-initializers -Werror=strict-prototypes SYSTEST_WARN = -Wall -Wextra -Werror -Wstrict-prototypes -pedantic -Wno-missing-field-initializers -Werror=strict-prototypes SYSTEST_CFLAGS += -std=c99 -fPIC -g $(SYSTEST_WARN) $(CDEFS) $(OPTIMIZE) -DTEST UNITY_INC = ./vendor/unity/src UNITY_SRC = ./vendor/unity/src/unity.c Loading
config/Doxyfile +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ PROJECT_NAME = kinetic-c # could be handy for archiving the generated documentation or if some version # control system is used. PROJECT_NUMBER = "v0.9.1" PROJECT_NUMBER = "v0.10.0-beta" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a Loading
config/project.yml +2 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ - -g - -Wall - -Wextra - -Werror - -pedantic - -Wstrict-prototypes # - -Werror=strict-prototypes Loading @@ -108,6 +109,7 @@ - -g - -Wall - -Wextra - -Werror # - -pedantic - -Wstrict-prototypes # - -Werror=strict-prototypes Loading
include/kinetic_client.h +27 −17 Original line number Diff line number Diff line Loading @@ -28,11 +28,21 @@ * * @param log_file (path to log file, 'stdout' to log to STDOUT, NULL to disable logging) * @param log_level Logging level (-1:none, 0:error, 1:info, 2:verbose, 3:full) * * @return Returns a pointer to a `KineticClient`. You need to pass * this pointer to KineticClient_CreateConnection() to create * new connections. * Once you are finished will the `KineticClient`, and there * are no active connections. The pointer should be release * with KineticClient_Shutdown() */ KineticClient * KineticClient_Init(const char* log_file, int log_level); /** * @brief Performs shutdown/cleanup of the kinetic-c client lib * * @param client The pointer returned from `KineticClient_Init` * */ void KineticClient_Shutdown(KineticClient * const client); Loading @@ -51,6 +61,8 @@ void KineticClient_Shutdown(KineticClient * const client); * .connection Pointer to dynamically allocated connection which will be * populated upon establishment of a connection. * * @param client The KineticClient pointer returned from KineticClient_Init() * * @return Returns the resulting `KineticStatus`, and `session->connection` * will be populated with a session instance pointer upon success. * The client should call KineticClient_DestroyConnection() in Loading Loading @@ -84,7 +96,10 @@ KineticStatus KineticClient_NoOp(KineticSession const * const session); * * @param session The connected KineticSession to use for the operation. * @param entry Key/value entry for object to store. 'value' must * specify the data to be stored. * specify the data to be stored. If a closure is provided * this pointer must remain valid until the closure callback * is called. * * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion in another thread. Loading Loading @@ -114,6 +129,8 @@ KineticStatus KineticClient_Flush(KineticSession const * const session, * @param session The connected KineticSession to use for the operation. * @param entry Key/value entry for object to retrieve. 'value' will * be populated unless 'metadataOnly' is set to 'true'. * If a closure is provided this pointer must remain * valid until the closure callback is called. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion in another thread. Loading @@ -132,7 +149,9 @@ KineticStatus KineticClient_Get(KineticSession const * const session, * be populated unless 'metadataOnly' is set to 'true'. * The key and value fields will be populated with the * previous key and its corresponding value, according to * lexicographical byte order. * lexicographical byte order. If a closure is provided * this pointer must remain valid until the closure callback * is called. * * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback Loading @@ -152,7 +171,9 @@ KineticStatus KineticClient_GetPrevious(KineticSession const * const session, * be populated unless 'metadataOnly' is set to 'true'. * The key and value fields will be populated with the * next key and its corresponding value, according to * lexicographical byte order. * lexicographical byte order. If a closure is provided * this pointer must remain valid until the closure callback * is called. * * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback Loading Loading @@ -186,7 +207,9 @@ KineticStatus KineticClient_Delete(KineticSession const * const session, * * @param session The connected KineticSession to use for the operation * @param range KineticKeyRange specifying keys to return * @param keys ByteBufferArray to store the retrieved keys * @param keys ByteBufferArray to store the retrieved keys. If a * closure is provided, this must point to valid memory * until the closure callback is called. * @param closure Optional closure. If specified, operation will be * executed in asynchronous mode, and closure callback * will be called upon completion in another thread. Loading Loading @@ -255,17 +278,4 @@ KineticStatus KineticClient_P2POperation(KineticSession const * const session, */ KineticStatus KineticClient_InstantSecureErase(KineticSession const * const session); /** * @brief Updates the cluster version. * * @param clusterVersion Current cluster version. * @param newClusterVersion New cluster version. * * @return Returns the resulting KineticStatus. */ KineticStatus KineticClient_SetClusterVersion(KineticSession handle, int64_t clusterVersion, int64_t newClusterVersion); #endif // _KINETIC_CLIENT_H