From f4294327b46ce52017ade1764855475e2402f838 Mon Sep 17 00:00:00 2001 From: cblgh Date: Mon, 9 Nov 2026 14:52:44 +0100 Subject: [PATCH] endpoint: add option WithSecretKey --- endpoint/endpoint.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/endpoint/endpoint.go b/endpoint/endpoint.go index 8b54ad9..051d55f 100644 --- a/endpoint/endpoint.go +++ b/endpoint/endpoint.go @@ -68,6 +68,12 @@ func WithRelayMode(rMode *iroh.RelayMode) Option { } } +func WithSecretKey(secretKey []byte) Option { + return func(endpointBuilder *iroh.EndpointBuilder) error { + return endpointBuilder.SecretKey(secretKey) + } +} + func WithDebug() Option { return func(endpointBuilder *iroh.EndpointBuilder) error { lvl := new(slog.LevelVar) -- 2.54.0