36 lines
944 B
C
36 lines
944 B
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "stellar/log.h"
|
|
#include "stellar/packet.h"
|
|
|
|
struct stellar;
|
|
|
|
|
|
|
|
typedef void plugin_on_packet_func(struct packet *pkt, void *on_packet_cb_arg);
|
|
//return 0 if success, otherwise return -1.
|
|
int stellar_raw_packet_subscribe(struct stellar *st, plugin_on_packet_func *on_packet_cb, void *on_packet_cb_arg);
|
|
|
|
void stellar_emit_datapath_telemetry(struct packet *pkt, const char * module, const char *str);
|
|
|
|
// only send user build packet, can't send packet which come from network
|
|
// void stellar_send_build_packet(struct stellar *st, struct packet *pkt);
|
|
|
|
struct stellar *stellar_new(const char *toml_file);
|
|
void stellar_run(struct stellar *st);
|
|
void stellar_free(struct stellar *st);
|
|
void stellar_loopbreak(struct stellar *st);
|
|
void stellar_reload_log_level(struct stellar *st);
|
|
struct logger *stellar_get_logger(struct stellar *st);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|