Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions core/include/ten_utils/log/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
__LINE__, __VA_ARGS__); \
} while (0)

typedef struct ten_string_t ten_string_t;
typedef struct ten_log_t ten_log_t;

typedef enum TEN_LOG_LEVEL {
TEN_LOG_LEVEL_INVALID,

Expand All @@ -97,8 +100,12 @@ typedef enum TEN_LOG_LEVEL {
TEN_LOG_LEVEL_FATAL,
} TEN_LOG_LEVEL;

typedef struct ten_string_t ten_string_t;
typedef struct ten_log_t ten_log_t;
typedef enum TEN_LOG_OUTPUT_TYPE {
TEN_LOG_OUTPUT_TYPE_INVALID,

TEN_LOG_OUTPUT_TYPE_FILE,
TEN_LOG_OUTPUT_TYPE_STDERR,
} TEN_LOG_OUTPUT_TYPE;

typedef void (*ten_log_output_on_output_func_t)(ten_log_t *self,
ten_string_t *msg);
Expand All @@ -121,6 +128,8 @@ typedef struct ten_log_output_t {
ten_log_output_on_close_func_t on_close;
ten_log_output_on_reload_func_t on_reload;
ten_log_output_on_deinit_func_t on_deinit;

TEN_LOG_OUTPUT_TYPE type;
void *user_data;
} ten_log_output_t;

Expand Down
2 changes: 2 additions & 0 deletions core/include_internal/ten_utils/log/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ TEN_UTILS_API void ten_log_global_set_output_to_stderr(void);

TEN_UTILS_API void ten_log_global_set_output_to_file(const char *log_path);

TEN_UTILS_API const char *ten_log_global_get_output_file_path(void);

TEN_UTILS_API void ten_log_global_set_encrypt_cb(
ten_log_encrypt_on_encrypt_func_t cb, void *cb_data);

Expand Down
2 changes: 2 additions & 0 deletions core/include_internal/ten_utils/log/output.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ TEN_UTILS_PRIVATE_API void ten_log_output_to_stderr(ten_log_t *self,

TEN_UTILS_PRIVATE_API void ten_log_set_output_to_file(ten_log_t *self,
const char *log_path);

TEN_UTILS_PRIVATE_API const char *ten_log_get_output_file_path(ten_log_t *self);
108 changes: 2 additions & 106 deletions core/src/ten_manager/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/src/ten_manager/src/cmd/cmd_fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ pub async fn execute_cmd(
Some(command_data.pkg_type),
Some(command_data.pkg_name.clone()),
Some(command_data.version_req.clone()),
None, // No tag filtering.
None,
None, // Retrieve all packages.
&out,
Expand Down
1 change: 1 addition & 0 deletions core/src/ten_manager/src/create/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub async fn create_pkg_in_path(
Some(*pkg_type),
Some(template_pkg_name.clone()),
Some(template_pkg_version.clone()),
None, // No tag filtering.
None,
None, // Retrieve all packages.
out,
Expand Down
1 change: 1 addition & 0 deletions core/src/ten_manager/src/dep_and_candidate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ async fn process_non_local_dependency_to_get_candidate(
// design, this is the best we can do for now. The answer won't be
// wrong, but the efficiency might be somewhat lower.
Some(version_req.clone()),
None, // No tag filtering.
None,
None, // Retrieve all packages.
out,
Expand Down
5 changes: 5 additions & 0 deletions core/src/ten_manager/src/designer/registry/packages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ pub struct GetPackagesRequestPayload {
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(default)]
pub page: Option<u32>,

#[serde(skip_serializing_if = "Option::is_none")]
#[serde(default)]
pub tags: Option<Vec<String>>,
}

#[derive(Serialize, Debug)]
Expand Down Expand Up @@ -71,6 +75,7 @@ pub async fn get_packages_endpoint(
request_query.pkg_type,
request_query.name.clone(),
version_req,
request_query.tags.clone(),
request_query.page_size,
request_query.page,
&state.out,
Expand Down
Loading
Loading