MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / NewMuxService

Function NewMuxService

sqlchain/mux.go:33–40  ·  view source on GitHub ↗

NewMuxService creates a new multiplexing service and registers it to rpc server.

(serviceName string, server *rpc.Server)

Source from the content-addressed store, hash-verified

31
32// NewMuxService creates a new multiplexing service and registers it to rpc server.
33func NewMuxService(serviceName string, server *rpc.Server) (service *MuxService, err error) {
34 service = &MuxService{
35 ServiceName: serviceName,
36 }
37
38 err = server.RegisterService(serviceName, service)
39 return
40}
41
42func (s *MuxService) register(id proto.DatabaseID, service *ChainRPCService) {
43 s.serviceMap.Store(id, service)

Callers 5

NewDBMSFunction · 0.92
TestSingleDatabaseFunction · 0.92
TestInitFailedFunction · 0.92
TestDatabaseRecycleFunction · 0.92
TestMultiChainFunction · 0.70

Calls 1

RegisterServiceMethod · 0.80

Tested by 4

TestSingleDatabaseFunction · 0.74
TestInitFailedFunction · 0.74
TestDatabaseRecycleFunction · 0.74
TestMultiChainFunction · 0.56