{"id":15517567,"url":"https://github.com/bodgit/libevent-graphite","last_synced_at":"2025-03-16T22:49:06.666Z","repository":{"id":7710751,"uuid":"9075820","full_name":"bodgit/libevent-graphite","owner":"bodgit","description":"Non-blocking Graphite client for libevent-based applications","archived":false,"fork":false,"pushed_at":"2013-06-20T16:22:38.000Z","size":152,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T04:34:01.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bodgit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-28T11:37:00.000Z","updated_at":"2019-07-15T21:16:27.000Z","dependencies_parsed_at":"2022-09-11T07:20:37.028Z","dependency_job_id":null,"html_url":"https://github.com/bodgit/libevent-graphite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Flibevent-graphite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Flibevent-graphite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Flibevent-graphite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Flibevent-graphite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bodgit","download_url":"https://codeload.github.com/bodgit/libevent-graphite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945478,"owners_count":20372894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T10:13:47.847Z","updated_at":"2025-03-16T22:49:06.632Z","avatar_url":"https://github.com/bodgit.png","language":"C","readme":"libevent-graphite - asynchronous non-blocking Graphite client\n=============================================================\n\nBased around libevent bufferevents and designed to be used as part of a bigger\nlibevent-based application.\n\nExample usage:\n\n    #include \u003cstdio.h\u003e\n    \n    #include \"graphite.h\"\n    \n    void\n    connect_cb(struct graphite_connection *c, void *arg)\n    {\n            struct event *ev = (struct event *)arg;\n            struct timeval tv = { 60, 0 };\n    \n            printf(\"Connected\\n\");\n    \n            evtimer_add(ev, \u0026tv);\n    }\n    \n    void\n    disconnect_cb(struct graphite_connection *c, void *arg)\n    {\n            struct event *ev = (struct event *)arg;\n    \n            printf(\"Disconnected\\n\");\n    \n            evtimer_del(ev);\n    }\n    \n    void\n    timer(int fd, short event, void *arg)\n    {\n            struct graphite_connection *c = (struct graphite_connection *)arg;\n            struct timeval tv;\n    \n            gettimeofday(\u0026tv, NULL);\n    \n            graphite_send(c, \"universe.answer\", \"42\", tv.tv_sec);\n    }\n    \n    int\n    main(int argc, char *argv[])\n    {\n            struct event_base *base;\n            struct timeval tv = { 10, 0 };\n            struct graphite_connection *c;\n            struct event *ev;\n    \n            base = event_base_new();\n    \n            if (graphite_init(base) \u003c 0)\n                    return (-1);\n    \n            if ((c = graphite_connection_new(\"192.0.2.1\",\n                GRAPHITE_DEFAULT_PORT, tv)) == NULL)\n                    return (-1);\n    \n            ev = event_new(base, -1, EV_PERSIST, timer, (void *)c);\n    \n            graphite_connection_setcb(c, connect_cb, disconnect_cb,\n                (void *)ev);\n    \n            graphite_connect(c);\n    \n            event_base_dispatch(base);\n    \n            return (0);\n    }\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodgit%2Flibevent-graphite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodgit%2Flibevent-graphite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodgit%2Flibevent-graphite/lists"}