func (s *Server) SendFederationRequest(deployment *docker.Deployment, req gomatrixserverlib.FederationRequest, resBody interface{}) error {
	if err := req.Sign(gomatrixserverlib.ServerName(s.ServerName), s.KeyID, s.Priv); err != nil {
		return err
	}

	httpReq, err := req.HTTPRequest()
	if err != nil {
		return err
	}

	httpClient := gomatrixserverlib.NewClient(gomatrixserverlib.WithTransport(&docker.RoundTripper{Deployment: deployment}))
	return httpClient.DoRequestAndParseResponse(context.Background(), httpReq, resBody)
}
// SendFederationRequest signs and sends an arbitrary federation request from this server.
//
// The requests will be routed according to the deployment map in `deployment`.
SendFederationRequest signs and sends an arbitrary federation request from this server.

The requests will be routed according to the deployment map in `deployment`.
// SendFederationRequest signs and sends an arbitrary federation request from this server . // // The requests will be routed according to the deployment map in ` deployment ` .
func (s *Server) SendFederationRequest(deployment *docker.Deployment, req gomatrixserverlib.FederationRequest, resBody interface{}) error {
	if err := req.Sign(gomatrixserverlib.ServerName(s.ServerName), s.KeyID, s.Priv); err != nil {
		return err
	}
	httpReq, err := req.HTTPRequest()
	if err != nil {
		return err
	}
	httpClient := gomatrixserverlib.NewClient(gomatrixserverlib.WithTransport(&docker.RoundTripper{Deployment: deployment}))
	return httpClient.DoRequestAndParseResponse(context.Background(), httpReq, resBody)
}
func ( s * Server ) SendFederationRequest ( deployment * docker . Deployment , req gomatrixserverlib . FederationRequest , resBody interface { } ) error { if err := req . Sign ( gomatrixserverlib . ServerName ( s . ServerName ) , s . KeyID , s . Priv ) ; err != nil { return err } httpReq , err := req . HTTPRequest ( ) if err != nil { return err } httpClient := gomatrixserverlib . NewClient ( gomatrixserverlib . WithTransport ( & docker . RoundTripper { Deployment : deployment } ) ) return httpClient . DoRequestAndParseResponse ( context . Background ( ) , httpReq , resBody ) }
SendFederationRequest signs and sends an arbitrary federation request from this server.
SendFederationRequest signs and sends an arbitrary federation request from this server .