add stream utilities
This commit is contained in:
		
							parent
							
								
									239346a435
								
							
						
					
					
						commit
						45fa48e1e5
					
				| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
package natsio
 | 
			
		||||
 | 
			
		||||
var Stream = struct {
 | 
			
		||||
var AllStreams = struct {
 | 
			
		||||
	Selly      string
 | 
			
		||||
	User       string
 | 
			
		||||
	HelpCenter string
 | 
			
		||||
| 
						 | 
				
			
			@ -16,7 +16,7 @@ var Stream = struct {
 | 
			
		|||
	Jobs:       "jobs",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var SellyServer = struct {
 | 
			
		||||
var AllServers = struct {
 | 
			
		||||
	App   string
 | 
			
		||||
	Admin string
 | 
			
		||||
	SMS   string
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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)
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue