feat: implement DERP streaming on tailnet Client API (#11302)

Implements DERPMap streaming from client API.

In a subsequent PR I plan to remove the implementation in coderd/agentapi in favor of the tailnet one
This commit is contained in:
Spike Curtis
2024-01-02 08:07:57 +04:00
committed by GitHub
parent 055a160431
commit d257f8163d
3 changed files with 72 additions and 19 deletions

View File

@ -479,7 +479,11 @@ func New(options *Options) *API {
}
}
api.TailnetClientService, err = tailnet.NewClientService(
api.Logger.Named("tailnetclient"), &api.TailnetCoordinator)
api.Logger.Named("tailnetclient"),
&api.TailnetCoordinator,
api.Options.DERPMapUpdateFrequency,
api.DERPMap,
)
if err != nil {
api.Logger.Fatal(api.ctx, "failed to initialize tailnet client service", slog.Error(err))
}