Skip to content

Commit

Permalink
Merge pull request #340 from ripienaar/dependencies
Browse files Browse the repository at this point in the history
update dependencies, mention kv deprecation
  • Loading branch information
ripienaar authored Nov 24, 2021
2 parents bf06085 + e6e948f commit b1f2cc1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/dustin/go-humanize v1.0.0
github.com/google/go-cmp v0.5.6
github.com/klauspost/compress v1.13.6
github.com/nats-io/nats-server/v2 v2.6.5
github.com/nats-io/nats.go v1.13.1-0.20211031210100-5c4ad1696c20
github.com/nats-io/nats-server/v2 v2.6.6-0.20211122213926-f094918f35b8
github.com/nats-io/nats.go v1.13.1-0.20211122170419-d7c1d78a50fc
github.com/nats-io/nuid v1.0.1
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQ
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0=
github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/nats-io/jwt/v2 v2.1.0 h1:1UbfD5g1xTdWmSeRV8bh/7u+utTiBsRtWhLl1PixZp4=
github.com/nats-io/jwt/v2 v2.1.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k=
github.com/nats-io/nats-server/v2 v2.6.5 h1:VTG8gdSw4bEqMwKudOHkBLqGwNpNaJOwruj3+rquQlQ=
github.com/nats-io/nats-server/v2 v2.6.5/go.mod h1:LlMieumxNUnCloOTVFv7Wog0YnasScxARUMXVXv9/+M=
github.com/nats-io/jwt/v2 v2.2.0 h1:Yg/4WFK6vsqMudRg91eBb7Dh6XeVcDMPHycDE8CfltE=
github.com/nats-io/jwt/v2 v2.2.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k=
github.com/nats-io/nats-server/v2 v2.6.6-0.20211122213926-f094918f35b8 h1:UKhEhYEiZhmFabtgUyjsVEQdlfrvVrJkavxQ+++aSk4=
github.com/nats-io/nats-server/v2 v2.6.6-0.20211122213926-f094918f35b8/go.mod h1:n8O5NeknIIQgQld7//20NnQpCe1o5xIjVFxzh7IIZ6Y=
github.com/nats-io/nats.go v1.13.1-0.20211018182449-f2416a8b1483/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w=
github.com/nats-io/nats.go v1.13.1-0.20211031210100-5c4ad1696c20 h1:0DGFqjme02ZSMHQZwii/aYQ/+fiwUn1krbQcUdOKgz8=
github.com/nats-io/nats.go v1.13.1-0.20211031210100-5c4ad1696c20/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w=
github.com/nats-io/nats.go v1.13.1-0.20211122170419-d7c1d78a50fc h1:SHr4MUUZJ/fAC0uSm2OzWOJYsHpapmR86mpw7q1qPXU=
github.com/nats-io/nats.go v1.13.1-0.20211122170419-d7c1d78a50fc/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w=
github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8=
github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4=
github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw=
Expand Down
14 changes: 13 additions & 1 deletion kv/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,22 @@ var (
)

// NewBucket creates or load a bucket. If the bucket already exist the existing bucket configuration is not reconciled
//
// Deprecated: this is now deprecated, please use the KV feature in nats.go
func NewBucket(nc *nats.Conn, bucket string, opts ...Option) (KV, error) {
return newOrLoad(nc, bucket, true, opts...)
}

// NewClient creates a new read-write client
//
// Deprecated: this is now deprecated, please use the KV feature in nats.go
func NewClient(nc *nats.Conn, bucket string, opts ...Option) (KV, error) {
return newOrLoad(nc, bucket, false, opts...)
}

// NewRoClient creates a read only key value store.
//
// NOTE: for now this is just a client, but this is reserved for read replicas use cases
// Deprecated: this is now deprecated, please use the KV feature in nats.go
func NewRoClient(nc *nats.Conn, bucket string, opts ...Option) (RoKV, error) {
return NewClient(nc, bucket, opts...)
}
Expand Down Expand Up @@ -107,6 +111,7 @@ func newOrLoad(nc *nats.Conn, bucket string, create bool, opts ...Option) (KV, e
return store, nil
}

// Deprecated: this is now deprecated, please use the KV feature in nats.go
type Storage interface {
KV

Expand All @@ -116,6 +121,8 @@ type Storage interface {
}

// KV is a read-write interface to a single key-value store bucket
//
// Deprecated: this is now deprecated, please use the KV feature in nats.go
type KV interface {
// Put saves a value into a key
Put(key string, val []byte, opts ...PutOption) (seq uint64, err error)
Expand All @@ -133,6 +140,8 @@ type KV interface {
}

// RoKV is a read-only interface to a single key-value store bucket
//
// Deprecated: this is now deprecated, please use the KV feature in nats.go
type RoKV interface {
// Get gets a key from the store
Get(key string) (Entry, error)
Expand Down Expand Up @@ -166,6 +175,7 @@ type Decoder interface {
Decode(value []byte) ([]byte, error)
}

// Deprecated: this is now deprecated, please use the KV feature in nats.go
type Entry interface {
// Bucket is the bucket the data was loaded from
Bucket() string
Expand Down Expand Up @@ -194,6 +204,8 @@ type GenericEntry struct {
}

// Watch observes a bucket and report any changes via NextValue or Channel
//
// Deprecated: this is now deprecated, please use the KV feature in nats.go
type Watch interface {
// Channel returns a channel to read changes from
Channel() chan Entry
Expand Down

0 comments on commit b1f2cc1

Please sign in to comment.