(ctx context.Context, serverName gomatrixserverlib.ServerName)
| 26 | } |
| 27 | |
| 28 | func (a *FederationInternalAPI) fetchServerKeysDirectly(ctx context.Context, serverName gomatrixserverlib.ServerName) (*gomatrixserverlib.ServerKeys, error) { |
| 29 | ctx, cancel := context.WithTimeout(ctx, time.Second*30) |
| 30 | defer cancel() |
| 31 | ires, err := a.doRequestIfNotBackingOffOrBlacklisted(serverName, func() (interface{}, error) { |
| 32 | return a.federation.GetServerKeys(ctx, serverName) |
| 33 | }) |
| 34 | if err != nil { |
| 35 | return nil, err |
| 36 | } |
| 37 | sks := ires.(gomatrixserverlib.ServerKeys) |
| 38 | return &sks, nil |
| 39 | } |
| 40 | |
| 41 | func (a *FederationInternalAPI) fetchServerKeysFromCache( |
| 42 | ctx context.Context, req *api.QueryServerKeysRequest, |
no test coverage detected