MCPcopy Create free account
hub / github.com/CPChain/chain / SampleService

Struct SampleService

node/node_example_test.go:23–23  ·  view source on GitHub ↗

SampleService is a trivial network service that can be attached to a node for life cycle management. The following methods are needed to implement a node.Service: - Protocols() []p2p.Protocol - devp2p protocols the service can communicate on - APIs() []rpc.API - api methods the service wa

Source from the content-addressed store, hash-verified

21// - Start() error - method invoked when the node is ready to start the service
22// - Stop() error - method invoked when the node terminates the service
23type SampleService struct{}
24
25func (s *SampleService) Protocols() []p2p.Protocol { return nil }
26func (s *SampleService) APIs() []rpc.API { return nil }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected