code: func NewHandlerService(
  	dieChan chan bool,
  	packetDecoder codec.PacketDecoder,
  	packetEncoder codec.PacketEncoder,
  	serializer serialize.Serializer,
  	heartbeatTime time.Duration,
  	messagesBufferSize,
  	localProcessBufferSize,
  	remoteProcessBufferSize int,
  	server *cluster.Server,
  	remoteService *RemoteService,
  	messageEncoder message.Encoder,
  	metricsReporters []metrics.Reporter,
  ) *HandlerService {
  	h := &HandlerService{
  		services:           make(map[string]*component.Service),
  		chLocalProcess:     make(chan unhandledMessage, localProcessBufferSize),
  		chRemoteProcess:    make(chan unhandledMessage, remoteProcessBufferSize),
  		decoder:            packetDecoder,
  		encoder:            packetEncoder,
  		messagesBufferSize: messagesBufferSize,
  		serializer:         serializer,
  		heartbeatTimeout:   heartbeatTime,
  		appDieChan:         dieChan,
  		server:             server,
  		remoteService:      remoteService,
  		messageEncoder:     messageEncoder,
  		metricsReporters:   metricsReporters,
  	}
  
  	return h
  }
docs: // NewHandlerService creates and returns a new handler service