add stream utilities

This commit is contained in:
namhq1989 2022-12-16 16:58:35 +07:00
parent 239346a435
commit 45fa48e1e5
2 changed files with 16 additions and 2 deletions

View File

@ -1,6 +1,6 @@
package natsio package natsio
var Stream = struct { var AllStreams = struct {
Selly string Selly string
User string User string
HelpCenter string HelpCenter string
@ -16,7 +16,7 @@ var Stream = struct {
Jobs: "jobs", Jobs: "jobs",
} }
var SellyServer = struct { var AllServers = struct {
App string App string
Admin string Admin string
SMS string SMS string

14
stream_utilties.go Normal file
View File

@ -0,0 +1,14 @@
package natsio
type StreamUtilities struct {
Stream string
Server string
}
func (s StreamUtilities) GenerateReqrepSubject(subject string) string {
return GenerateReqrepSubject(s.Stream, s.Server, subject)
}
func (s StreamUtilities) GenerateJetStreamSubject(subject string) string {
return GenerateJetStreamSubject(s.Stream, s.Server, subject)
}