This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stellar-stellar/include/stellar/stellar.h

33 lines
794 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);
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