github.com/linapex/ethereum-dpos-chinese@v0.0.0-20190316121959-b78b3a4a1ece/swarm/api/testapi.go (about) 1 2 //<developer> 3 // <name>linapex 曹一峰</name> 4 // <email>linapex@163.com</email> 5 // <wx>superexc</wx> 6 // <qqgroup>128148617</qqgroup> 7 // <url>https://jsq.ink</url> 8 // <role>pku engineer</role> 9 // <date>2019-03-16 12:09:47</date> 10 //</624342670222823424> 11 12 // 13 // 14 // 15 // 16 // 17 // 18 // 19 // 20 // 21 // 22 // 23 // 24 // 25 // 26 // 27 28 package api 29 30 import ( 31 "github.com/ethereum/go-ethereum/swarm/network" 32 ) 33 34 type Control struct { 35 api *API 36 hive *network.Hive 37 } 38 39 func NewControl(api *API, hive *network.Hive) *Control { 40 return &Control{api, hive} 41 } 42 43 // 44 // 45 // 46 // 47 // 48 // 49 // 50 // 51 // 52 // 53 // 54 // 55 func (c *Control) Hive() string { 56 return c.hive.String() 57 } 58