code: func NewServer(id, serverType string, frontend bool, metadata ...map[string]string) *Server {
  	d := make(map[string]string)
  	h, err := os.Hostname()
  	if err != nil {
  		logger.Log.Errorf("failed to get hostname: %s", err.Error())
  	}
  	if len(metadata) > 0 {
  		d = metadata[0]
  	}
  	return &Server{
  		ID:       id,
  		Type:     serverType,
  		Metadata: d,
  		Frontend: frontend,
  		Hostname: h,
  	}
  }
docs: // NewServer ctor