github.com/klaytn/klaytn@v1.12.1/node/cn/doc.go (about) 1 // Copyright 2018 The klaytn Authors 2 // This file is part of the klaytn library. 3 // 4 // The klaytn library is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Lesser General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // The klaytn library is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Lesser General Public License for more details. 13 // 14 // You should have received a copy of the GNU Lesser General Public License 15 // along with the klaytn library. If not, see <http://www.gnu.org/licenses/>. 16 17 /* 18 Package cn implements components related to network management and message handling. 19 CN implements the Klaytn consensus node service. 20 ProtocolManager handles the messages from the peer nodes and manages its peers. 21 Peer is the interface used for peer nodes and has two different kinds of implementation 22 depending on single or multi channel usage. 23 24 Source Files 25 26 - api.go : provides private debug API related to block and state 27 - api_backend.go : implements CNAPIBackend which is a wrapper of CN to serve API requests 28 - backend.go : implements CN struct used for the Klaytn consensus node service 29 - bloombits.go : implements BloomIndexer, an indexer built with bloom bits for fast filtering 30 - channel_manager.go : implements ChannelManager struct, which is used to manage channel for each message 31 - config.go : defines the configuration used by CN struct 32 - gen_config.go : is automatically generated from config.go 33 - handler.go : implements ProtocolManager which handles the message and manages network peers 34 - metrics.go : includes statistics used in cn package 35 - peer.go : provides the interface and implementation of Peer interface 36 - peer_set.go : provides the interface and implementation of PeerSet interface 37 - protocol.go : defines the protocol version of Klaytn network and includes errors in cn package 38 - sync.go : includes syncing features of ProtocolManager 39 */ 40 package cn