Merge pull request #4 from Selly-Modules/pubsub-with-json-encode
encode connection to pubsub
This commit is contained in:
		
						commit
						4eb30ac5d5
					
				| 
						 | 
					@ -34,3 +34,8 @@ func (sv Server) Subscribe(subject string, cb nats.MsgHandler) (*nats.Subscripti
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return sub, nil
 | 
						return sub, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewJSONEncodedConn ...
 | 
				
			||||||
 | 
					func (sv Server) NewJSONEncodedConn() (*nats.EncodedConn, error) {
 | 
				
			||||||
 | 
						return nats.NewEncodedConn(sv.instance, nats.JSON_ENCODER)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue