{"action":"opened","number":66,"pull_request":{"url":"https://api.github.com/repos/fluent/fluent-bit/pulls/66","id":67171051,"html_url":"https://github.com/fluent/fluent-bit/pull/66","diff_url":"https://github.com/fluent/fluent-bit/pull/66.diff","patch_url":"https://github.com/fluent/fluent-bit/pull/66.patch","issue_url":"https://api.github.com/repos/fluent/fluent-bit/issues/66","number":66,"state":"open","locked":false,"title":"out_lib: new output plugin to handle incoming data from input plugin.","user":{"login":"nokute78","id":16795275,"avatar_url":"https://avatars.githubusercontent.com/u/16795275?v=3","gravatar_id":"","url":"https://api.github.com/users/nokute78","html_url":"https://github.com/nokute78","followers_url":"https://api.github.com/users/nokute78/followers","following_url":"https://api.github.com/users/nokute78/following{/other_user}","gists_url":"https://api.github.com/users/nokute78/gists{/gist_id}","starred_url":"https://api.github.com/users/nokute78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nokute78/subscriptions","organizations_url":"https://api.github.com/users/nokute78/orgs","repos_url":"https://api.github.com/users/nokute78/repos","events_url":"https://api.github.com/users/nokute78/events{/privacy}","received_events_url":"https://api.github.com/users/nokute78/received_events","type":"User","site_admin":false},"body":"I wrote a new output plugin out_lib.\r\nThis is a plugin for library mode.\r\n\r\n## usecase\r\n\r\n* To transmit the data with specific network.\r\n* To pass the data to kernel driver.\r\n* To re-format data by user.\r\n\r\nUser can register own callback and handle data which comes from input plugin.\r\nNow, the data format is raw msgpack, but it should be JSON.\r\nIt is consistent, since in_lib requires JSON data.\r\n\r\n## callback\r\n\r\nThe prototype of callback should be\r\n``` c\r\n  int (*callback)(void* data, size_t size);\r\n```\r\n     @param   data  The data which comes from input plugin.\r\n     @param   size  The size of data.\r\n     @return  success ? 0 : negative value.\r\n\r\n## how to register\r\n\r\n3rd argument of flb_output() is callback function pointer.\r\n``` c\r\noutput = flb_output(ctx, \"lib\", callback);\r\n```","created_at":"2016-04-20T11:34:33Z","updated_at":"2016-04-20T11:34:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fluent/fluent-bit/pulls/66/commits","review_comments_url":"https://api.github.com/repos/fluent/fluent-bit/pulls/66/comments","review_comment_url":"https://api.github.com/repos/fluent/fluent-bit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fluent/fluent-bit/issues/66/comments","statuses_url":"https://api.github.com/repos/fluent/fluent-bit/statuses/64f1e4c203a402cda1b2035b6c0417efbdb5c5e4","head":{"label":"nokute78:out_lib","ref":"out_lib","sha":"64f1e4c203a402cda1b2035b6c0417efbdb5c5e4","user":{"login":"nokute78","id":16795275,"avatar_url":"https://avatars.githubusercontent.com/u/16795275?v=3","gravatar_id":"","url":"https://api.github.com/users/nokute78","html_url":"https://github.com/nokute78","followers_url":"https://api.github.com/users/nokute78/followers","following_url":"https://api.github.com/users/nokute78/following{/other_user}","gists_url":"https://api.github.com/users/nokute78/gists{/gist_id}","starred_url":"https://api.github.com/users/nokute78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nokute78/subscriptions","organizations_url":"https://api.github.com/users/nokute78/orgs","repos_url":"https://api.github.com/users/nokute78/repos","events_url":"https://api.github.com/users/nokute78/events{/privacy}","received_events_url":"https://api.github.com/users/nokute78/received_events","type":"User","site_admin":false},"repo":{"id":50022891,"name":"fluent-bit","full_name":"nokute78/fluent-bit","owner":{"login":"nokute78","id":16795275,"avatar_url":"https://avatars.githubusercontent.com/u/16795275?v=3","gravatar_id":"","url":"https://api.github.com/users/nokute78","html_url":"https://github.com/nokute78","followers_url":"https://api.github.com/users/nokute78/followers","following_url":"https://api.github.com/users/nokute78/following{/other_user}","gists_url":"https://api.github.com/users/nokute78/gists{/gist_id}","starred_url":"https://api.github.com/users/nokute78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nokute78/subscriptions","organizations_url":"https://api.github.com/users/nokute78/orgs","repos_url":"https://api.github.com/users/nokute78/repos","events_url":"https://api.github.com/users/nokute78/events{/privacy}","received_events_url":"https://api.github.com/users/nokute78/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nokute78/fluent-bit","description":"Data Collector for IoT & Embedded Linux","fork":true,"url":"https://api.github.com/repos/nokute78/fluent-bit","forks_url":"https://api.github.com/repos/nokute78/fluent-bit/forks","keys_url":"https://api.github.com/repos/nokute78/fluent-bit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nokute78/fluent-bit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nokute78/fluent-bit/teams","hooks_url":"https://api.github.com/repos/nokute78/fluent-bit/hooks","issue_events_url":"https://api.github.com/repos/nokute78/fluent-bit/issues/events{/number}","events_url":"https://api.github.com/repos/nokute78/fluent-bit/events","assignees_url":"https://api.github.com/repos/nokute78/fluent-bit/assignees{/user}","branches_url":"https://api.github.com/repos/nokute78/fluent-bit/branches{/branch}","tags_url":"https://api.github.com/repos/nokute78/fluent-bit/tags","blobs_url":"https://api.github.com/repos/nokute78/fluent-bit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nokute78/fluent-bit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nokute78/fluent-bit/git/refs{/sha}","trees_url":"https://api.github.com/repos/nokute78/fluent-bit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nokute78/fluent-bit/statuses/{sha}","languages_url":"https://api.github.com/repos/nokute78/fluent-bit/languages","stargazers_url":"https://api.github.com/repos/nokute78/fluent-bit/stargazers","contributors_url":"https://api.github.com/repos/nokute78/fluent-bit/contributors","subscribers_url":"https://api.github.com/repos/nokute78/fluent-bit/subscribers","subscription_url":"https://api.github.com/repos/nokute78/fluent-bit/subscription","commits_url":"https://api.github.com/repos/nokute78/fluent-bit/commits{/sha}","git_commits_url":"https://api.github.com/repos/nokute78/fluent-bit/git/commits{/sha}","comments_url":"https://api.github.com/repos/nokute78/fluent-bit/comments{/number}","issue_comment_url":"https://api.github.com/repos/nokute78/fluent-bit/issues/comments{/number}","contents_url":"https://api.github.com/repos/nokute78/fluent-bit/contents/{+path}","compare_url":"https://api.github.com/repos/nokute78/fluent-bit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nokute78/fluent-bit/merges","archive_url":"https://api.github.com/repos/nokute78/fluent-bit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nokute78/fluent-bit/downloads","issues_url":"https://api.github.com/repos/nokute78/fluent-bit/issues{/number}","pulls_url":"https://api.github.com/repos/nokute78/fluent-bit/pulls{/number}","milestones_url":"https://api.github.com/repos/nokute78/fluent-bit/milestones{/number}","notifications_url":"https://api.github.com/repos/nokute78/fluent-bit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nokute78/fluent-bit/labels{/name}","releases_url":"https://api.github.com/repos/nokute78/fluent-bit/releases{/id}","deployments_url":"https://api.github.com/repos/nokute78/fluent-bit/deployments","created_at":"2016-01-20T10:30:49Z","updated_at":"2016-01-20T10:30:54Z","pushed_at":"2016-04-20T11:25:41Z","git_url":"git://github.com/nokute78/fluent-bit.git","ssh_url":"git@github.com:nokute78/fluent-bit.git","clone_url":"https://github.com/nokute78/fluent-bit.git","svn_url":"https://github.com/nokute78/fluent-bit","homepage":"http://fluentbit.io/","size":6989,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fluent:master","ref":"master","sha":"24c9ce96a3179762cd219c5327d9eb632f7f6e9b","user":{"login":"fluent","id":859518,"avatar_url":"https://avatars.githubusercontent.com/u/859518?v=3","gravatar_id":"","url":"https://api.github.com/users/fluent","html_url":"https://github.com/fluent","followers_url":"https://api.github.com/users/fluent/followers","following_url":"https://api.github.com/users/fluent/following{/other_user}","gists_url":"https://api.github.com/users/fluent/gists{/gist_id}","starred_url":"https://api.github.com/users/fluent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluent/subscriptions","organizations_url":"https://api.github.com/users/fluent/orgs","repos_url":"https://api.github.com/users/fluent/repos","events_url":"https://api.github.com/users/fluent/events{/privacy}","received_events_url":"https://api.github.com/users/fluent/received_events","type":"Organization","site_admin":false},"repo":{"id":29933948,"name":"fluent-bit","full_name":"fluent/fluent-bit","owner":{"login":"fluent","id":859518,"avatar_url":"https://avatars.githubusercontent.com/u/859518?v=3","gravatar_id":"","url":"https://api.github.com/users/fluent","html_url":"https://github.com/fluent","followers_url":"https://api.github.com/users/fluent/followers","following_url":"https://api.github.com/users/fluent/following{/other_user}","gists_url":"https://api.github.com/users/fluent/gists{/gist_id}","starred_url":"https://api.github.com/users/fluent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluent/subscriptions","organizations_url":"https://api.github.com/users/fluent/orgs","repos_url":"https://api.github.com/users/fluent/repos","events_url":"https://api.github.com/users/fluent/events{/privacy}","received_events_url":"https://api.github.com/users/fluent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fluent/fluent-bit","description":"Data Collector for IoT & Embedded Linux","fork":false,"url":"https://api.github.com/repos/fluent/fluent-bit","forks_url":"https://api.github.com/repos/fluent/fluent-bit/forks","keys_url":"https://api.github.com/repos/fluent/fluent-bit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fluent/fluent-bit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fluent/fluent-bit/teams","hooks_url":"https://api.github.com/repos/fluent/fluent-bit/hooks","issue_events_url":"https://api.github.com/repos/fluent/fluent-bit/issues/events{/number}","events_url":"https://api.github.com/repos/fluent/fluent-bit/events","assignees_url":"https://api.github.com/repos/fluent/fluent-bit/assignees{/user}","branches_url":"https://api.github.com/repos/fluent/fluent-bit/branches{/branch}","tags_url":"https://api.github.com/repos/fluent/fluent-bit/tags","blobs_url":"https://api.github.com/repos/fluent/fluent-bit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fluent/fluent-bit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fluent/fluent-bit/git/refs{/sha}","trees_url":"https://api.github.com/repos/fluent/fluent-bit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fluent/fluent-bit/statuses/{sha}","languages_url":"https://api.github.com/repos/fluent/fluent-bit/languages","stargazers_url":"https://api.github.com/repos/fluent/fluent-bit/stargazers","contributors_url":"https://api.github.com/repos/fluent/fluent-bit/contributors","subscribers_url":"https://api.github.com/repos/fluent/fluent-bit/subscribers","subscription_url":"https://api.github.com/repos/fluent/fluent-bit/subscription","commits_url":"https://api.github.com/repos/fluent/fluent-bit/commits{/sha}","git_commits_url":"https://api.github.com/repos/fluent/fluent-bit/git/commits{/sha}","comments_url":"https://api.github.com/repos/fluent/fluent-bit/comments{/number}","issue_comment_url":"https://api.github.com/repos/fluent/fluent-bit/issues/comments{/number}","contents_url":"https://api.github.com/repos/fluent/fluent-bit/contents/{+path}","compare_url":"https://api.github.com/repos/fluent/fluent-bit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fluent/fluent-bit/merges","archive_url":"https://api.github.com/repos/fluent/fluent-bit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fluent/fluent-bit/downloads","issues_url":"https://api.github.com/repos/fluent/fluent-bit/issues{/number}","pulls_url":"https://api.github.com/repos/fluent/fluent-bit/pulls{/number}","milestones_url":"https://api.github.com/repos/fluent/fluent-bit/milestones{/number}","notifications_url":"https://api.github.com/repos/fluent/fluent-bit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fluent/fluent-bit/labels{/name}","releases_url":"https://api.github.com/repos/fluent/fluent-bit/releases{/id}","deployments_url":"https://api.github.com/repos/fluent/fluent-bit/deployments","created_at":"2015-01-27T20:41:52Z","updated_at":"2016-03-21T14:37:46Z","pushed_at":"2016-04-19T14:55:00Z","git_url":"git://github.com/fluent/fluent-bit.git","ssh_url":"git@github.com:fluent/fluent-bit.git","clone_url":"https://github.com/fluent/fluent-bit.git","svn_url":"https://github.com/fluent/fluent-bit","homepage":"http://fluentbit.io/","size":7012,"stargazers_count":89,"watchers_count":89,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"open_issues_count":13,"forks":10,"open_issues":13,"watchers":89,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fluent/fluent-bit/pulls/66"},"html":{"href":"https://github.com/fluent/fluent-bit/pull/66"},"issue":{"href":"https://api.github.com/repos/fluent/fluent-bit/issues/66"},"comments":{"href":"https://api.github.com/repos/fluent/fluent-bit/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/fluent/fluent-bit/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/fluent/fluent-bit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fluent/fluent-bit/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/fluent/fluent-bit/statuses/64f1e4c203a402cda1b2035b6c0417efbdb5c5e4"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":234,"deletions":0,"changed_files":10}}