{"action":"opened","issue":{"url":"https://api.github.com/repos/yfhk/fabric_log/issues/20","repository_url":"https://api.github.com/repos/yfhk/fabric_log","labels_url":"https://api.github.com/repos/yfhk/fabric_log/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/yfhk/fabric_log/issues/20/comments","events_url":"https://api.github.com/repos/yfhk/fabric_log/issues/20/events","html_url":"https://github.com/yfhk/fabric_log/issues/20","id":383728048,"node_id":"MDU6SXNzdWUzODM3MjgwNDg=","number":20,"title":"ChannelSupportRegistrar  只是某个chanel的","user":{"login":"yfhk","id":43233169,"node_id":"MDQ6VXNlcjQzMjMzMTY5","avatar_url":"https://avatars1.githubusercontent.com/u/43233169?v=4","gravatar_id":"","url":"https://api.github.com/users/yfhk","html_url":"https://github.com/yfhk","followers_url":"https://api.github.com/users/yfhk/followers","following_url":"https://api.github.com/users/yfhk/following{/other_user}","gists_url":"https://api.github.com/users/yfhk/gists{/gist_id}","starred_url":"https://api.github.com/users/yfhk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yfhk/subscriptions","organizations_url":"https://api.github.com/users/yfhk/orgs","repos_url":"https://api.github.com/users/yfhk/repos","events_url":"https://api.github.com/users/yfhk/events{/privacy}","received_events_url":"https://api.github.com/users/yfhk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-23T07:50:25Z","updated_at":"2018-11-23T07:50:25Z","closed_at":null,"author_association":"OWNER","body":"// ChannelSupportRegistrar provides a way for the Handler to look up the Support for a channel\r\ntype ChannelSupportRegistrar interface {\r\n\t// BroadcastChannelSupport returns the message channel header, whether the message is a config update\r\n\t// and the channel resources for a message or an error if the message is not a message which can\r\n\t// be processed directly (like CONFIG and ORDERER_TRANSACTION messages)\r\n\tBroadcastChannelSupport(msg *cb.Envelope) (*cb.ChannelHeader, bool, ChannelSupport, error)\r\n}\r\n\r\n\r\n\r\ntype handlerImpl struct {\r\n\tsm ChannelSupportRegistrar\r\n}\r\n\r\n\r\n\r\n\r\n\r\n// Handle starts a service thread for a given gRPC connection and services the broadcast connection\r\nfunc (bh *handlerImpl) Handle(srv ab.AtomicBroadcast_BroadcastServer) error {\r\n\taddr := util.ExtractRemoteAddress(srv.Context())\r\n\tlogger.Debugf(\"Starting new broadcast loop for %s\", addr)\r\n\tfor {\r\n\t\tmsg, err := srv.Recv()\r\n\t\tif err == io.EOF {\r\n\t\t\tlogger.Debugf(\"Received EOF from %s, hangup\", addr)\r\n\t\t\treturn nil\r\n\t\t}\r\n\t\tif err != nil {\r\n\t\t\tlogger.Warningf(\"Error reading from %s: %s\", addr, err)\r\n\t\t\treturn err\r\n\t\t}"}}
{"actor":{"display_login":"yfhk"}}