Documentation
¶
Overview ¶
Package app assembles the business services and manages their lifecycle.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Services ¶
type Services struct {
Connections *connection.Service
Cluster *cluster.Service
Topics *destination.Service
Consumers *subscription.Service
Messages *message.Service
Settings *configuration.Service
ACL *access.Service
Routing *routing.Service
Scopes *scope.Service
RabbitMQ *rabbitmqservice.Service
Kafka *kafkaservice.Service
MQTT *mqttservice.Service
Pulsar *pulsarservice.Service
RedisStream *redisstreamservice.Service
NATS *natsservice.Service
ActiveMQ *activemqservice.Service
NSQ *nsqservice.Service
SQS *sqsservice.Service
GooglePubSub *googlepubsubservice.Service
ServiceBus *azureservicebusservice.Service
Kinesis *kinesisservice.Service
IBMMQ *ibmmqservice.Service
Solace *solaceservice.Service
// Conns resolves a profile id to a live connection. The bridge needs it to
// answer capability questions without going through a domain service.
Conns func(connID int) (driver.Conn, error)
// Collector keeps the TPS history filling in while the window is hidden.
Collector *collector.Collector
// contains filtered or unexported fields
}
Services aggregates business services required by the HTTP transport layer.
func New ¶
New initializes the local encryption key and assembles all business services, for the process that owns the stored files.
func NewReadOnly ¶ added in v0.2.0
* NewReadOnly assembles the same services for a process that does not own the * stored files. * * Two of the things New does are the window's alone, and both of them write. * The collector samples on a timer and keeps the TPS history on disk; auto * connect dials the default profile through Connect, which stamps a status * into the profile store and saves the whole file. Either one from a second * process is a race for a file that is rewritten entire, with an in-process * lock as its only guard. * * What is left still reads those files, and still dials - through * Connections.OpenReadOnly, which resolves a profile exactly as Connect does * and records nothing.
func NewReadOnlyIn ¶ added in v0.2.0
NewReadOnlyIn is NewReadOnly over a named directory rather than the one this installation keeps its files in. It exists so a caller can have a whole application against a store it owns outright - which today means a test that must be able to say the profile file was not written.
func (*Services) Close ¶
func (s *Services) Close()
Close stops background sampling and releases every open connection.
func (*Services) RefreshReadOnly ¶ added in v0.2.0
RefreshReadOnly brings a NewReadOnly assembly level with what the window has written since it started. Settings go first: a profile that leans on the global credentials is dialled from both files, and the connections judge their open clients by what the settings say now.
Never call it from the window's assembly, whose state in memory is the authority over those files rather than a copy of them.