Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbozhenko committed Jan 9, 2025
1 parent 1e1519f commit 4c6b4bc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions jetstream/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ type (
WatchFiltered(ctx context.Context, keys []string, opts ...WatchOpt) (KeyWatcher, error)

// Keys will return all keys.
//
// Deprecated: Use ListKeys instead to avoid memory issues.
Keys(ctx context.Context, opts ...WatchOpt) ([]string, error)

Expand Down
1 change: 1 addition & 0 deletions jetstream/stream_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ type (
Metadata map[string]string `json:"metadata,omitempty"`

// Template identifies the template that manages the Stream.
//
// Deprecated: This feature is no longer supported.
Template string `json:"template_owner,omitempty"`
}
Expand Down
9 changes: 7 additions & 2 deletions jsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type JetStreamManager interface {
PurgeStream(name string, opts ...JSOpt) error

// StreamsInfo can be used to retrieve a list of StreamInfo objects.
//
// Deprecated: Use Streams() instead.
StreamsInfo(opts ...JSOpt) <-chan *StreamInfo

Expand Down Expand Up @@ -86,6 +87,7 @@ type JetStreamManager interface {
ConsumerInfo(stream, name string, opts ...JSOpt) (*ConsumerInfo, error)

// ConsumersInfo is used to retrieve a list of ConsumerInfo objects.
//
// Deprecated: Use Consumers() instead.
ConsumersInfo(stream string, opts ...JSOpt) <-chan *ConsumerInfo

Expand Down Expand Up @@ -240,8 +242,9 @@ type StreamConfig struct {
// v2.10.0 or later.
Metadata map[string]string `json:"metadata,omitempty"`

// Template identifies the template that manages the Stream. Deprecated:
// This feature is no longer supported.
// Template identifies the template that manages the Stream.
//
// Deprecated: This feature is no longer supported.
Template string `json:"template_owner,omitempty"`
}

Expand Down Expand Up @@ -747,6 +750,7 @@ func (jsc *js) Consumers(stream string, opts ...JSOpt) <-chan *ConsumerInfo {
}

// ConsumersInfo is used to retrieve a list of ConsumerInfo objects.
//
// Deprecated: Use Consumers() instead.
func (jsc *js) ConsumersInfo(stream string, opts ...JSOpt) <-chan *ConsumerInfo {
return jsc.Consumers(stream, opts...)
Expand Down Expand Up @@ -1617,6 +1621,7 @@ func (jsc *js) Streams(opts ...JSOpt) <-chan *StreamInfo {
}

// StreamsInfo can be used to retrieve a list of StreamInfo objects.
//
// Deprecated: Use Streams() instead.
func (jsc *js) StreamsInfo(opts ...JSOpt) <-chan *StreamInfo {
return jsc.Streams(opts...)
Expand Down
1 change: 1 addition & 0 deletions kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ type KeyValue interface {
// argument. It can be configured with the same options as Watch.
WatchFiltered(keys []string, opts ...WatchOpt) (KeyWatcher, error)
// Keys will return all keys.
//
// Deprecated: Use ListKeys instead to avoid memory issues.
Keys(opts ...WatchOpt) ([]string, error)
// ListKeys will return all keys in a channel.
Expand Down
5 changes: 5 additions & 0 deletions nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ type Options struct {
// DisconnectedCB sets the disconnected handler that is called
// whenever the connection is disconnected.
// Will not be called if DisconnectedErrCB is set
//
// Deprecated. Use DisconnectedErrCB which passes error that caused
// the disconnect event.
DisconnectedCB ConnHandler
Expand Down Expand Up @@ -462,6 +463,7 @@ type Options struct {
TokenHandler AuthTokenHandler

// Dialer allows a custom net.Dialer when forming connections.
//
// Deprecated: should use CustomDialer instead.
Dialer *net.Dialer

Expand Down Expand Up @@ -1127,6 +1129,7 @@ func DisconnectErrHandler(cb ConnErrHandler) Option {
}

// DisconnectHandler is an Option to set the disconnected handler.
//
// Deprecated: Use DisconnectErrHandler.
func DisconnectHandler(cb ConnHandler) Option {
return func(o *Options) error {
Expand Down Expand Up @@ -1306,6 +1309,7 @@ func SyncQueueLen(max int) Option {

// Dialer is an Option to set the dialer which will be used when
// attempting to establish a connection.
//
// Deprecated: Should use CustomDialer instead.
func Dialer(dialer *net.Dialer) Option {
return func(o *Options) error {
Expand Down Expand Up @@ -1430,6 +1434,7 @@ func TLSHandshakeFirst() Option {
// Handler processing

// SetDisconnectHandler will set the disconnect event handler.
//
// Deprecated: Use SetDisconnectErrHandler
func (nc *Conn) SetDisconnectHandler(dcb ConnHandler) {
if nc == nil {
Expand Down

0 comments on commit 4c6b4bc

Please sign in to comment.