Documentation ¶
Index ¶
- Constants
- Variables
- type ParametersMQTT
- type Server
- func (s *Server) PublishBlock(blk *inx.RawBlock)
- func (s *Server) PublishBlockMetadata(metadata *inx.BlockMetadata)
- func (s *Server) PublishMilestoneOnTopic(topic string, ms *nodebridge.Milestone)
- func (s *Server) PublishOnOutputChainTopics(outputID iotago.OutputID, output iotago.Output, payloadFunc func() interface{})
- func (s *Server) PublishOnTopic(topic string, payload interface{})
- func (s *Server) PublishOnTopicIfSubscribed(topic string, payload interface{})
- func (s *Server) PublishOnUnlockConditionTopics(baseTopic string, output iotago.Output, payloadFunc func() interface{})
- func (s *Server) PublishOutput(ctx context.Context, ledgerIndex uint32, output *inx.LedgerOutput, ...)
- func (s *Server) PublishPayloadFuncOnTopicIfSubscribed(topic string, payloadFunc func() interface{})
- func (s *Server) PublishRawOnTopicIfSubscribed(topic string, payload []byte)
- func (s *Server) PublishReceipt(r *inx.RawReceipt)
- func (s *Server) PublishSpent(ledgerIndex uint32, spent *inx.LedgerSpent)
- func (s *Server) PublishTransactionIncludedBlock(transactionID iotago.TransactionID, block *inx.RawBlock)
- func (s *Server) Run(ctx context.Context)
Constants ¶
View Source
const (
APIRoute = "mqtt/v1"
)
Variables ¶
View Source
var (
Component *app.Component
)
View Source
var ParamsMQTT = &ParametersMQTT{}
Functions ¶
This section is empty.
Types ¶
type ParametersMQTT ¶
type ParametersMQTT struct { BufferSize int `default:"0" usage:"the size of the client buffers in bytes"` BufferBlockSize int `default:"0" usage:"the size per client buffer R/W block in bytes"` Subscriptions struct { MaxTopicSubscriptionsPerClient int `default:"1000" usage:"the maximum number of topic subscriptions per client before the client gets dropped (DOS protection)"` TopicsCleanupThresholdCount int `default:"10000" usage:"the number of deleted topics that trigger a garbage collection of the subscription manager"` TopicsCleanupThresholdRatio float32 `` /* 132-byte string literal not displayed */ } Websocket struct { Enabled bool `default:"true" usage:"whether to enable the websocket connection of the MQTT broker"` BindAddress string `default:"localhost:1888" usage:"the websocket bind address on which the MQTT broker listens on"` AdvertiseAddress string `default:"" usage:"the address of the websocket of the MQTT broker which is advertised to the INX Server (optional)."` } TCP struct { Enabled bool `default:"false" usage:"whether to enable the TCP connection of the MQTT broker"` BindAddress string `default:"localhost:1883" usage:"the TCP bind address on which the MQTT broker listens on"` Auth struct { Enabled bool `default:"false" usage:"whether to enable auth for TCP connections"` PasswordSalt string `` /* 140-byte string literal not displayed */ Users map[string]string `usage:"the list of allowed users with their password+salt as a scrypt hash"` } TLS struct { Enabled bool `default:"false" usage:"whether to enable TLS for TCP connections"` PrivateKeyPath string `default:"private_key.pem" usage:"the path to the private key file (x509 PEM) for TCP connections with TLS"` CertificatePath string `default:"certificate.pem" usage:"the path to the certificate file (x509 PEM) for TCP connections with TLS"` } `name:"tls"` } `name:"tcp"` }
type Server ¶
type Server struct { *logger.WrappedLogger MQTTBroker *mqtt.Broker NodeBridge *nodebridge.NodeBridge // contains filtered or unexported fields }
func NewServer ¶
func NewServer(log *logger.Logger, bridge *nodebridge.NodeBridge, shutdownHandler *shutdown.ShutdownHandler, brokerOpts ...mqtt.BrokerOption) (*Server, error)
func (*Server) PublishBlock ¶
func (*Server) PublishBlockMetadata ¶
func (s *Server) PublishBlockMetadata(metadata *inx.BlockMetadata)
func (*Server) PublishMilestoneOnTopic ¶
func (s *Server) PublishMilestoneOnTopic(topic string, ms *nodebridge.Milestone)
func (*Server) PublishOnOutputChainTopics ¶
func (*Server) PublishOnTopic ¶
func (*Server) PublishOnTopicIfSubscribed ¶
func (*Server) PublishOnUnlockConditionTopics ¶
func (*Server) PublishOutput ¶
func (*Server) PublishPayloadFuncOnTopicIfSubscribed ¶
func (*Server) PublishRawOnTopicIfSubscribed ¶
func (*Server) PublishReceipt ¶
func (s *Server) PublishReceipt(r *inx.RawReceipt)
func (*Server) PublishSpent ¶
func (s *Server) PublishSpent(ledgerIndex uint32, spent *inx.LedgerSpent)
func (*Server) PublishTransactionIncludedBlock ¶
func (s *Server) PublishTransactionIncludedBlock(transactionID iotago.TransactionID, block *inx.RawBlock)
Click to show internal directories.
Click to hide internal directories.