code: func NewConnector(config Config) (*Connector, error) {
  	// Ensure host, port, serviceName, and callerName are all specified.
  	if config.Host == "" {
  		return nil, errors.New("no host specified")
  	}
  
  	if config.Port == "" {
  		return nil, errors.New("no port specified")
  	}
  
  	if config.ServiceName == "" {
  		return nil, errors.New("no serviceName specified")
  	}
  
  	if config.CallerName == "" {
  		return nil, errors.New("no callerName specified")
  	}
  
  	ycfg := rpc.Config{Name: config.CallerName}
  	hostPort := fmt.Sprintf("%s:%s", config.Host, config.Port)
  	// this looks wrong, BUT since it's a uni-directional tchannel
  	// connection, we have to pass CallerName as the tchannel "ServiceName"
  	// for source/destination to be reported correctly by RPC layer.
  	ts, err := tchannel.NewChannelTransport(tchannel.ServiceName(config.CallerName))
  	if err != nil {
  		return nil, err
  	}
  	ycfg.Outbounds = rpc.Outbounds{
  		config.ServiceName: {
  			Unary: ts.NewSingleOutbound(hostPort),
  		},
  	}
  
  	// important to note that this will panic if config contains invalid
  	// values such as service name containing invalid characters
  	dispatcher := rpc.NewDispatcher(ycfg)
  	if err := dispatcher.Start(); err != nil {
  		return nil, err
  	}
  
  	client := dosaclient.New(dispatcher.ClientConfig(config.ServiceName))
  
  	return &Connector{
  		dispatcher: dispatcher,
  		client:     client,
  		headers:    checkHeaders(config.ExtraHeaders, config.CallerName),
  	}, nil
  }
docs: // NewConnector creates a new instance with user provided transport