func (s *Service) Open() error {
	s.Logger.Info("Starting cluster service")
	s.wg.Add(1)
	go s.serve()
	return nil
}
Open opens the network listener and begins serving requests.
package coordinator
import (
	"context"
	"encoding"
	"encoding/binary"
	"errors"
	"fmt"
	"io"
	"net"
	"runtime/debug"
	"strings"
	"sync"
	"sync/atomic"
	"time"
	"github.com/influxdata/influxdb"
	"github.com/influxdata/influxdb/models"
	"github.com/influxdata/influxdb/pkg/tracing"
	"github.com/influxdata/influxdb/query"
	"github.com/influxdata/influxdb/tsdb"
	"github.com/influxdata/influxql"
	"go.uber.org/zap"
	"github.com/influxdata/influxdb/services/meta"
)
const MaxMessageSize = 1024 * 1024 * 1024  
const MuxHeader = 2
const (
	writeShardReq       = "writeShardReq"
	writeShardPointsReq = "writeShardPointsReq"
	writeShardFail      = "writeShardFail"
	createIteratorReq  = "createIteratorReq"
	createIteratorFail = "createIteratorFail"
	fieldDimensionsReq  = "fieldDimensionsReq"
	fieldDimensionsFail = "fieldDimensionsFail"
	tagKeysReq  = "tagKeysReq"
	tagKeysFail = "tagKeysFail"
	tagValuesReq  = "tagValuesReq"
	tagValuesFail = "tagValuesFail"
	measurementNamesReq  = "measurementNamesReq"
	measurementNamesFail = "measurementNamesFail"
	seriesCardinalityReq  = "seriesCardinalityReq"
	seriesCardinalityFail = "seriesCardinalityFail"
	iteratorCostReq  = "iteratorCostReq"
	iteratorCostFail = "iteratorCostFail"
	mapTypeReq  = "mapTypeReq"
	mapTypeFail = "mapTypeFail"
)
type Service struct {
	mu      sync.RWMutex
	Node    *influxdb.Node
	wg      sync.WaitGroup
	closing chan struct{}
	Listener net.Listener
	MetaClient interface {
		ShardOwner(shardID uint64) (string, string, *meta.ShardGroupInfo)
	}
	TSDBStore   TSDBStore
	TaskManager *query.TaskManager
	Logger *zap.Logger
	stats  *InternalServiceStatistics
}
func NewService(c Config) *Service {
	return &Service{
		closing: make(chan struct{}),
		stats:  &InternalServiceStatistics{},
		Logger: zap.NewNop(),
	}
}