Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docstring typos in nats and jetstream protocol #1013

Merged
merged 1 commit into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions protocol/nats/v2/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

var ErrInvalidQueueName = errors.New("invalid queue name for QueueSubscriber")

// NatsOptions is a helper function to group a variadic stan.ProtocolOption into
// []stan.Option that can be used by either Sender, Consumer or Protocol
// NatsOptions is a helper function to group a variadic nats.ProtocolOption into
// []nats.Option that can be used by either Sender, Consumer or Protocol
func NatsOptions(opts ...nats.Option) []nats.Option {
return opts
}
Expand Down
2 changes: 1 addition & 1 deletion protocol/nats/v2/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Protocol struct {
Sender *Sender
senderOptions []SenderOption

connOwned bool // whether this protocol created the stan connection
connOwned bool // whether this protocol created the nats connection
}

// NewProtocol creates a new NATS protocol.
Expand Down
4 changes: 2 additions & 2 deletions protocol/nats/v2/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Sender struct {
connOwned bool
}

// NewSender creates a new protocol.Sender responsible for opening and closing the STAN connection
// NewSender creates a new protocol.Sender responsible for opening and closing the NATS connection
func NewSender(url, subject string, natsOpts []nats.Option, opts ...SenderOption) (*Sender, error) {
conn, err := nats.Connect(url, natsOpts...)
if err != nil {
Expand All @@ -40,7 +40,7 @@ func NewSender(url, subject string, natsOpts []nats.Option, opts ...SenderOption
return s, nil
}

// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the STAN
// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the NATS
// connection to the caller
func NewSenderFromConn(conn *nats.Conn, subject string, opts ...SenderOption) (*Sender, error) {
s := &Sender{
Expand Down
2 changes: 1 addition & 1 deletion protocol/nats_jetstream/v2/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func NewSender(url, stream, subject string, natsOpts []nats.Option, jsmOpts []na
return s, nil
}

// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the STAN
// NewSenderFromConn creates a new protocol.Sender which leaves responsibility for opening and closing the NATS
// connection to the caller
func NewSenderFromConn(conn *nats.Conn, stream, subject string, jsmOpts []nats.JSOpt, opts ...SenderOption) (*Sender, error) {
jsm, err := conn.JetStream(jsmOpts...)
Expand Down
Loading