github.com/linapex/ethereum-go-chinese@v0.0.0-20190316121929-f8b7a73c3fa1/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 19:16:43</date> 10 //</624450112449417216> 11 12 13 package api 14 15 import ( 16 "github.com/ethereum/go-ethereum/swarm/network" 17 ) 18 19 type Control struct { 20 api *API 21 hive *network.Hive 22 } 23 24 func NewControl(api *API, hive *network.Hive) *Control { 25 return &Control{api, hive} 26 } 27 28 func (c *Control) Hive() string { 29 return c.hive.String() 30 } 31