Skip to content

StubResolver::lookup_srv: TTL is not exposed #461

@WhyNotHugo

Description

@WhyNotHugo

I'm using StubResolver::lookup_srv to resolve the location of CalDav/CardDav servers via rfc6764.

My implementation works fine so far, but the lookup_srv does not return the TTL, so my application cannot know how long it should cache these results.

Currently, lookup_srv returns Result<Option<FoundSrvs>, SrvError>.

I believe that the FoundSrvs could have an additional property describing the TTL of the result. This change would be backwards compatible, since it would merely add a new field to a returned field.

I'm not sure what the best format is to return the TTL. Returning the raw integer means that the caller needs to immediately convert it into a timestamp, but might be a sensible choice to keep domain's implementation and API the simplest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions