endpoint: add option WithSecretKey #30

Merged
decentral1se merged 1 commits from OptionWithSecretKey into main 2026-11-09 13:56:15 +00:00
+6
View File
@@ -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)