github.com/s7techlab/cckit@v0.10.5/extensions/pinger/chaincode_pinger.go (about) 1 package pinger 2 3 import ( 4 "github.com/golang/protobuf/ptypes/empty" 5 6 "github.com/s7techlab/cckit/router" 7 ) 8 9 func NewService() *ChaincodePinger { 10 return &ChaincodePinger{} 11 } 12 13 type ChaincodePinger struct{} 14 15 func (c *ChaincodePinger) Ping(ctx router.Context, _ *empty.Empty) (*PingInfo, error) { 16 i, err := Ping(ctx) 17 if err != nil { 18 return nil, err 19 } 20 21 return i.(*PingInfo), err 22 }