17 Commits

Author SHA1 Message Date
tomFlowee 9e165d07ef Allow basedir to be given in the config file.
A general cleanup of how we start indexer.
2026-05-21 23:51:09 +02:00
tomFlowee 55328ce0d7 Help binding to future interfaces
The idea of binding to interfaces now will take into account the
interfaces maybe becoming available only after the server started.

If your server starts at machine boot, it is a 50/50 chance that the
network interfaces are already fully configured and have received
addresses. In case of dhcp, more often than not this means that your
server will not be listening at the main interface because it wasn't up
yet.

This new api allows the server to give a function to register a new
interface and we have some linux specific code that will notice changes
in the interfaces and we'll allow the app to bind to it a moment or two
after that.
2025-02-20 20:37:33 +01:00
tomFlowee 1deaab6cc3 Search harder for config file.
This gets around the sillyness where you need an extra dir for a config.
  ~/.config/flowee/rest-service/rest-service.conf

now you can just use
  ~/.config/flowee/rest-service.conf
2021-02-06 23:10:17 +01:00
tomFlowee 9748d3988f Cleanups and improvements. 2020-12-25 23:51:06 +01:00
TomZ b257ac62b3 Due to popular demand: bind on all interfaces
When there is no config we now bind on all available (at startup)
interfaces to listen for service requests.

This solves the problem where a fresh server would not listen to
requests from the outside world but only on localhost.
2020-11-16 19:44:24 +01:00
TomZ c3ddab9cd4 Make Indexer bind to localhost as default 2019-08-24 22:25:10 +02:00
TomZ cb5ff404d3 Refactor the Indexer application
This moves each indexer to live in its own thread, making blocking
operations allowed and Ok and separate from incoming requests.
2019-06-26 21:39:07 +02:00
TomZ fca434b1a6 Make Indexer connect to Hub after loading the conf
Doing it before could lead to incoming data being
processed before the SQL database connection was setup.
2019-06-13 17:12:28 +02:00
TomZ ec2610139e Allow setting indexer connections in conf file
This adds the ability to read from the config file the network
connections. Both the listening address and port as well as the upstream
'hub' address.
2019-06-06 19:44:16 +02:00
TomZ 1f52ae7a7f FloweeServiceApplication: support net wildcard
For service applications that bind to networks (currently
only indexer) this allows users to pass the address:
    0.0.0.0
to bind to. The effect will be that we find all the network
interfaces in the system and bind to all of them.
Notice that we already had "localhost" as an alias to bind to both
v4 and v6 loopback interfaces.

This new feature depends on optional dependency QtNetwork.
2019-05-17 12:32:11 +02:00
TomZ 5b155600d9 Make app arguments more consitent
Now everyone auto-connects to localhost unless passed the
option --connect=

Also make indexer find the logs.conf from the same dir as the
commandline passed config file.

This makes running it as a service more useful.
2019-05-09 12:16:11 +02:00
TomZ 8d81cc5471 Create new lib apputils
This lib depends on QtCore, as such it is separated from other libs. As
many apps depend on QtCore we can share classes here to avoid
duplication.
2019-05-07 20:53:22 +02:00
TomZ 78219d5bba Make the indexer-cli and indexer interact well
This adds lots of little things;
* Add GetTransaction API call
* I refactored the GetBlock API a little to reuse code.
* a new 'Version' API call for the hub
* API for the logging manager, so we can set a default
  setup with just C++-APIs
* various (usability) fixes in the FloweeServiceApplication
* Binding to localhost attempts to bind to both IPv4 and v6
* Print the actual transaction hex from indexer-cli (which really
  is just a testing app)
2019-04-10 20:52:04 +02:00
TomZ 20694d4f33 Make indexer be a server too 2019-04-09 19:34:55 +02:00
TomZ e14254f33d Make indexer load a config file for setup
Using standard ini file format.
This is the easiest way to configure it to connect to an external SQL
database.
2019-04-06 15:16:37 +02:00
TomZ 30d6cc9c72 Separate out a new FloweeServerApplication 2019-04-01 13:27:01 +02:00
TomZ 5c9373eeac Introduce new app 'indexer' 2019-04-01 10:57:03 +02:00