Documentation
¶
Index ¶
- func InjectGonatsProxy(s *GonatsProxy)
- func LoadGonatsProxy() baseiface.ISingleton
- type GonatsProxy
- func (gp *GonatsProxy) BorrowObject(ctx context.Context) (*gomsg.GonatsMsg, error)
- func (gp *GonatsProxy) CheckChannels() bool
- func (gp *GonatsProxy) CheckTimeout() bool
- func (gp *GonatsProxy) ChooseChannel(objectId string) int
- func (gp *GonatsProxy) CloseChannels()
- func (gp *GonatsProxy) Conn() (*nats.Conn, error)
- func (gp *GonatsProxy) Debug(v ...interface{}) *GonatsProxy
- func (gp *GonatsProxy) Dispatch(msg *nats.Msg)
- func (gp *GonatsProxy) Error(v ...interface{}) *GonatsProxy
- func (gp *GonatsProxy) Execute(ctx eventiface.EventContext)
- func (gp *GonatsProxy) GetNatsDto() *baseconfig.NatsClientDto
- func (gp *GonatsProxy) HandleChannels()
- func (gp *GonatsProxy) Info(v ...interface{}) *GonatsProxy
- func (gp *GonatsProxy) InitChannels()
- func (gp *GonatsProxy) PublishData(topic string, data []byte) error
- func (gp *GonatsProxy) PublishMsg(msg *nats.Msg) error
- func (gp *GonatsProxy) QueueSubscribe(topic string, queueName string, handler nats.MsgHandler) (*nats.Conn, error)
- func (gp *GonatsProxy) Request(msg *gomsg.GonatsMsg) *gomsg.GonatsMsg
- func (gp *GonatsProxy) ReturnObject(msg *gomsg.GonatsMsg)
- func (gp *GonatsProxy) Stat(v ...interface{}) *GonatsProxy
- func (gp *GonatsProxy) Subscribe(topic string, handler nats.MsgHandler) (*nats.Conn, error)
- func (gp *GonatsProxy) SubscribeSync(topic string) (*nats.Subscription, error)
- func (gp *GonatsProxy) Unsubscribe(topic string) error
- type IGonatsProxyAsync
- type IGonatsProxySync
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectGonatsProxy ¶
func InjectGonatsProxy(s *GonatsProxy)
func LoadGonatsProxy ¶
func LoadGonatsProxy() baseiface.ISingleton
Types ¶
type GonatsProxy ¶
type GonatsProxy struct {
basedto.BaseEntitySingle
*baseconfig.NatsClientDto
Channels []chan *nats.Msg
ITimeout time.Duration
WaitGroup sync.WaitGroup `json:"-"`
MsgHandler nats.MsgHandler `json:"-"`
// contains filtered or unexported fields
}
func NewGonatsProxy ¶
func NewGonatsProxy() *GonatsProxy
func (*GonatsProxy) BorrowObject ¶
func (*GonatsProxy) CheckChannels ¶
func (gp *GonatsProxy) CheckChannels() bool
func (*GonatsProxy) CheckTimeout ¶
func (gp *GonatsProxy) CheckTimeout() bool
func (*GonatsProxy) ChooseChannel ¶
func (gp *GonatsProxy) ChooseChannel(objectId string) int
func (*GonatsProxy) CloseChannels ¶
func (gp *GonatsProxy) CloseChannels()
func (*GonatsProxy) Debug ¶
func (gp *GonatsProxy) Debug(v ...interface{}) *GonatsProxy
func (*GonatsProxy) Dispatch ¶
func (gp *GonatsProxy) Dispatch(msg *nats.Msg)
func (*GonatsProxy) Error ¶
func (gp *GonatsProxy) Error(v ...interface{}) *GonatsProxy
func (*GonatsProxy) Execute ¶
func (gp *GonatsProxy) Execute(ctx eventiface.EventContext)
func (*GonatsProxy) GetNatsDto ¶
func (gp *GonatsProxy) GetNatsDto() *baseconfig.NatsClientDto
func (*GonatsProxy) HandleChannels ¶
func (gp *GonatsProxy) HandleChannels()
func (*GonatsProxy) Info ¶
func (gp *GonatsProxy) Info(v ...interface{}) *GonatsProxy
func (*GonatsProxy) InitChannels ¶
func (gp *GonatsProxy) InitChannels()
func (*GonatsProxy) PublishData ¶
func (gp *GonatsProxy) PublishData(topic string, data []byte) error
func (*GonatsProxy) PublishMsg ¶
func (gp *GonatsProxy) PublishMsg(msg *nats.Msg) error
func (*GonatsProxy) QueueSubscribe ¶
func (gp *GonatsProxy) QueueSubscribe(topic string, queueName string, handler nats.MsgHandler) (*nats.Conn, error)
func (*GonatsProxy) ReturnObject ¶
func (gp *GonatsProxy) ReturnObject(msg *gomsg.GonatsMsg)
func (*GonatsProxy) Stat ¶
func (gp *GonatsProxy) Stat(v ...interface{}) *GonatsProxy
func (*GonatsProxy) Subscribe ¶
func (gp *GonatsProxy) Subscribe(topic string, handler nats.MsgHandler) (*nats.Conn, error)
func (*GonatsProxy) SubscribeSync ¶
func (gp *GonatsProxy) SubscribeSync(topic string) (*nats.Subscription, error)
func (*GonatsProxy) Unsubscribe ¶
func (gp *GonatsProxy) Unsubscribe(topic string) error
type IGonatsProxyAsync ¶
Click to show internal directories.
Click to hide internal directories.