Documentation ¶
Index ¶
- func CreateNatsTransporter(options NATSOptions) transit.Transport
- type NATSOptions
- type NatsTransporter
- func (t *NatsTransporter) Connect() chan error
- func (t *NatsTransporter) Disconnect() chan error
- func (t *NatsTransporter) Publish(command, nodeID string, message nucleo.Payload)
- func (t *NatsTransporter) SetNodeID(nodeID string)
- func (t *NatsTransporter) SetPrefix(prefix string)
- func (t *NatsTransporter) SetSerializer(serializer serializer.Serializer)
- func (t *NatsTransporter) Subscribe(command, nodeID string, handler transit.TransportHandler)
- type StanOptions
- type StanTransporter
- func (transporter *StanTransporter) Connect() chan error
- func (transporter *StanTransporter) Disconnect() chan error
- func (transporter *StanTransporter) Publish(command, nodeID string, message nucleo.Payload)
- func (transporter *StanTransporter) SetNodeID(nodeID string)
- func (transporter *StanTransporter) SetPrefix(prefix string)
- func (transporter *StanTransporter) SetSerializer(serializer serializer.Serializer)
- func (transporter *StanTransporter) Subscribe(command string, nodeID string, handler transit.TransportHandler)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNatsTransporter ¶
func CreateNatsTransporter(options NATSOptions) transit.Transport
Types ¶
type NATSOptions ¶
type NATSOptions struct { URL string Name string Logger *log.Entry Serializer serializer.Serializer ValidateMsg transit.ValidateMsgFunc AllowReconnect bool ReconnectWait time.Duration MaxReconnect int }
type NatsTransporter ¶
type NatsTransporter struct {
// contains filtered or unexported fields
}
func (*NatsTransporter) Connect ¶
func (t *NatsTransporter) Connect() chan error
func (*NatsTransporter) Disconnect ¶
func (t *NatsTransporter) Disconnect() chan error
func (*NatsTransporter) Publish ¶
func (t *NatsTransporter) Publish(command, nodeID string, message nucleo.Payload)
func (*NatsTransporter) SetNodeID ¶
func (t *NatsTransporter) SetNodeID(nodeID string)
func (*NatsTransporter) SetPrefix ¶
func (t *NatsTransporter) SetPrefix(prefix string)
func (*NatsTransporter) SetSerializer ¶
func (t *NatsTransporter) SetSerializer(serializer serializer.Serializer)
func (*NatsTransporter) Subscribe ¶
func (t *NatsTransporter) Subscribe(command, nodeID string, handler transit.TransportHandler)
type StanOptions ¶
type StanOptions struct { URL string ClusterID string ClientID string Logger *log.Entry Serializer serializer.Serializer ValidateMsg transit.ValidateMsgFunc }
type StanTransporter ¶
type StanTransporter struct {
// contains filtered or unexported fields
}
func CreateStanTransporter ¶
func CreateStanTransporter(options StanOptions) StanTransporter
func (*StanTransporter) Connect ¶
func (transporter *StanTransporter) Connect() chan error
func (*StanTransporter) Disconnect ¶
func (transporter *StanTransporter) Disconnect() chan error
func (*StanTransporter) Publish ¶
func (transporter *StanTransporter) Publish(command, nodeID string, message nucleo.Payload)
func (*StanTransporter) SetNodeID ¶
func (transporter *StanTransporter) SetNodeID(nodeID string)
func (*StanTransporter) SetPrefix ¶
func (transporter *StanTransporter) SetPrefix(prefix string)
func (*StanTransporter) SetSerializer ¶
func (transporter *StanTransporter) SetSerializer(serializer serializer.Serializer)
func (*StanTransporter) Subscribe ¶
func (transporter *StanTransporter) Subscribe(command string, nodeID string, handler transit.TransportHandler)
Click to show internal directories.
Click to hide internal directories.