func (s *Server) registerServer() error {
	srv := services.Server{
		ID:        s.ID(),
		Addr:      s.AdvertiseAddr(),
		Hostname:  s.hostname,
		Labels:    s.labels,
		CmdLabels: s.getCommandLabels(),
	}
	if !s.proxyMode {
		return trace.Wrap(s.authService.UpsertNode(srv, defaults.ServerHeartbeatTTL))
	}
	return trace.Wrap(s.authService.UpsertProxy(srv, defaults.ServerHeartbeatTTL))
}
// registerServer attempts to register server in the cluster
registerServer attempts to register server in the cluster
// registerServer attempts to register server in the cluster
func (s *Server) registerServer() error {
	srv := services.Server{
		ID:        s.ID(),
		Addr:      s.AdvertiseAddr(),
		Hostname:  s.hostname,
		Labels:    s.labels,
		CmdLabels: s.getCommandLabels(),
	}
	if !s.proxyMode {
		return trace.Wrap(s.authService.UpsertNode(srv, defaults.ServerHeartbeatTTL))
	}
	return trace.Wrap(s.authService.UpsertProxy(srv, defaults.ServerHeartbeatTTL))
}
func ( s * Server ) registerServer ( ) error { srv := services . Server { ID : s . ID ( ) , Addr : s . AdvertiseAddr ( ) , Hostname : s . hostname , Labels : s . labels , CmdLabels : s . getCommandLabels ( ) , } if ! s . proxyMode { return trace . Wrap ( s . authService . UpsertNode ( srv , defaults . ServerHeartbeatTTL ) ) } return trace . Wrap ( s . authService . UpsertProxy ( srv , defaults . ServerHeartbeatTTL ) ) }
registerServer attempts to register server in the cluster
registerServer attempts to register server in the cluster