add more stream
This commit is contained in:
parent
92b0b45ec7
commit
21a288d927
24
constant.go
24
constant.go
|
@ -2,8 +2,18 @@ package natsio
|
|||
|
||||
var Stream = struct {
|
||||
Selly string
|
||||
User string
|
||||
HelpCenter string
|
||||
Order string
|
||||
Withdrawal string
|
||||
Jobs string
|
||||
}{
|
||||
Selly: "selly",
|
||||
User: "user",
|
||||
HelpCenter: "help_center",
|
||||
Order: "order",
|
||||
Withdrawal: "withdrawal",
|
||||
Jobs: "jobs",
|
||||
}
|
||||
|
||||
var SellyServer = struct {
|
||||
|
@ -17,17 +27,3 @@ var SellyServer = struct {
|
|||
SMS: "sms",
|
||||
Chat: "chat",
|
||||
}
|
||||
|
||||
var SellyService = struct {
|
||||
User string
|
||||
HelpCenter string
|
||||
Order string
|
||||
Withdrawal string
|
||||
Jobs string
|
||||
}{
|
||||
User: "user",
|
||||
HelpCenter: "help_center",
|
||||
Order: "order",
|
||||
Withdrawal: "withdrawal",
|
||||
Jobs: "jobs",
|
||||
}
|
||||
|
|
8
utils.go
8
utils.go
|
@ -21,13 +21,13 @@ func combineStreamAndSubjectName(stream, subject string) string {
|
|||
}
|
||||
|
||||
// GenerateJetStreamSubject ...
|
||||
func GenerateJetStreamSubject(stream, server, service, subject string) string {
|
||||
return fmt.Sprintf("%s.jetstream.%s.%s.%s", stream, server, service, subject)
|
||||
func GenerateJetStreamSubject(stream, server, subject string) string {
|
||||
return fmt.Sprintf("%s.jetstream.%s.%s", stream, server, subject)
|
||||
}
|
||||
|
||||
// GenerateReqrepSubject ...
|
||||
func GenerateReqrepSubject(stream, server, service, subject string) string {
|
||||
return fmt.Sprintf("%s.reqrep.%s.%s.%s", stream, server, service, subject)
|
||||
func GenerateReqrepSubject(stream, server, subject string) string {
|
||||
return fmt.Sprintf("%s.reqrep.%s.%s", stream, server, subject)
|
||||
}
|
||||
|
||||
// InterfaceToBytes ...
|
||||
|
|
Loading…
Reference in New Issue