client-c
0.8.1
|
External log upload strategy interface used by Kaa data collection subsystem to decide when to upload or cleanup logs. Must be implemented in a concrete application for the data collection feature to function. More...
#include "../platform/ext_log_storage.h"
Go to the source code of this file.
Enumerations | |
enum | ext_log_upload_decision_t { NOOP = 0, UPLOAD = 1 } |
enum | logging_delivery_error_code_t { NO_APPENDERS_CONFIGURED = 0x00, APPENDER_INTERNAL_ERROR = 0x01, REMOTE_CONNECTION_ERROR = 0x02, REMOTE_INTERNAL_ERROR = 0x03 } |
Functions | |
kaa_error_t | ext_log_upload_strategy_create (struct kaa_context_s *context, void **strategy_p, uint8_t type) |
ext_log_upload_decision_t | ext_log_upload_strategy_decide (void *context, const void *log_storage_context) |
Makes a decision whether to upload logs or cleanup the storage. More... | |
size_t | ext_log_upload_strategy_get_timeout (void *context) |
The maximum time to wait a log delivery response. More... | |
size_t | ext_log_upload_strategy_get_max_parallel_uploads (void *context) |
Max amount of log batches allowed to be uploaded parallel. More... | |
kaa_error_t | ext_log_upload_strategy_on_timeout (void *context) |
Handles timeout of a log delivery. More... | |
kaa_error_t | ext_log_upload_strategy_on_failure (void *context, logging_delivery_error_code_t error_code) |
Handles failure of a log delivery. More... | |
void | ext_log_upload_strategy_destroy (void *context) |
Destroys the instance of the log upload strategy. More... | |
External log upload strategy interface used by Kaa data collection subsystem to decide when to upload or cleanup logs. Must be implemented in a concrete application for the data collection feature to function.
Copyright 2014-2016 CyberVision, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file ext_log_upload_strategy.h.
Log upload decisions.
Enumerator | |
---|---|
NOOP |
Nothing to do yet. |
UPLOAD |
Trigger log upload. |
Definition at line 38 of file ext_log_upload_strategy.h.
Log delivery error codes.
Enumerator | |
---|---|
NO_APPENDERS_CONFIGURED | |
APPENDER_INTERNAL_ERROR | |
REMOTE_CONNECTION_ERROR | |
REMOTE_INTERNAL_ERROR |
Definition at line 46 of file ext_log_upload_strategy.h.
kaa_error_t ext_log_upload_strategy_create | ( | struct kaa_context_s * | context, |
void ** | strategy_p, | ||
uint8_t | type | ||
) |
ext_log_upload_decision_t ext_log_upload_strategy_decide | ( | void * | context, |
const void * | log_storage_context | ||
) |
Makes a decision whether to upload logs or cleanup the storage.
[in] | context | Log upload strategy context. |
[in] | log_storage_context | Log storage instance to operate against. |
void ext_log_upload_strategy_destroy | ( | void * | context | ) |
Destroys the instance of the log upload strategy.
[in] | context | The log strategy context. |
size_t ext_log_upload_strategy_get_max_parallel_uploads | ( | void * | context | ) |
Max amount of log batches allowed to be uploaded parallel.
[in] | context | Log upload strategy context. |
size_t ext_log_upload_strategy_get_timeout | ( | void * | context | ) |
The maximum time to wait a log delivery response.
[in] | context | Log upload strategy context. |
kaa_error_t ext_log_upload_strategy_on_failure | ( | void * | context, |
logging_delivery_error_code_t | error_code | ||
) |
Handles failure of a log delivery.
[in] | context | Log upload strategy context. |
[in] | error_code | Delivery error code. |
kaa_error_t ext_log_upload_strategy_on_timeout | ( | void * | context | ) |
Handles timeout of a log delivery.
[in] | context | Log upload strategy context. |