MCPcopy
hub / github.com/nats-io/nats.go / Nkey

Function Nkey

nats.go:1472–1481  ·  view source on GitHub ↗

Nkey will set the public Nkey and the signature callback to sign the server nonce.

(pubKey string, sigCB SignatureHandler)

Source from the content-addressed store, hash-verified

1470// Nkey will set the public Nkey and the signature callback to
1471// sign the server nonce.
1472func Nkey(pubKey string, sigCB SignatureHandler) Option {
1473 return func(o *Options) error {
1474 o.Nkey = pubKey
1475 o.SignatureCB = sigCB
1476 if pubKey != "" && sigCB == nil {
1477 return ErrNkeyButNoSigCB
1478 }
1479 return nil
1480 }
1481}
1482
1483// SyncQueueLen will set the maximum queue len for the internal
1484// channel used for SubscribeSync().

Callers 1

NkeyOptionFromSeedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected