add func get stream info

This commit is contained in:
Nam Huynh 2021-10-08 11:40:59 +07:00
parent 18da2c1372
commit 0b22d129b3
1 changed files with 5 additions and 0 deletions

View File

@ -7,6 +7,11 @@ import (
"github.com/nats-io/nats.go" "github.com/nats-io/nats.go"
) )
// GetStreamInfo ...
func GetStreamInfo(name string) (*nats.StreamInfo, error) {
return natsJS.StreamInfo(name)
}
// AddStream add new stream, with default config // AddStream add new stream, with default config
func AddStream(name string, subjects []string) error { func AddStream(name string, subjects []string) error {
// Get info about the stream // Get info about the stream