goproxy

package
v1.0.1-rel-02 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: AFL-3.0 Imports: 19 Imported by: 0

Documentation

Index

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 FindBeanGonatsProxy

func FindBeanGonatsProxy() *GonatsProxy

FindBeanGonatsProxy

func NewGonatsProxy

func NewGonatsProxy() *GonatsProxy

func (*GonatsProxy) BorrowObject

func (gp *GonatsProxy) BorrowObject(ctx context.Context) (*gomsg.GonatsMsg, error)

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) Conn

func (gp *GonatsProxy) Conn() (*nats.Conn, error)

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) Request

func (gp *GonatsProxy) Request(msg *gomsg.GonatsMsg) *gomsg.GonatsMsg

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

type IGonatsProxyAsync interface {
	PublishMsg(msg *nats.Msg) error
	QueueSubscribe(topic string, queueName string, handler nats.MsgHandler) (*nats.Conn, error)

	Request(msg *gomsg.GonatsMsg) *gomsg.GonatsMsg
	SubscribeSync(topic string) (*nats.Subscription, error)
	Conn() (*nats.Conn, error)
}

type IGonatsProxySync

type IGonatsProxySync interface {
	Request(msg *gomsg.GonatsMsg) *gomsg.GonatsMsg
	SubscribeSync(topic string) (*nats.Subscription, error)
	Conn() (*nats.Conn, error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL