package
0.0.0-20240917120716-8843776e9f3a
Repository: https://github.com/cossacklabs/acra.git
Documentation: pkg.go.dev

# Functions

BuildHTTPAPIConnectionWrapper builds the connection wrapper that will be used by the HTTP API server.
NewAPICore creates new APICore.
NewClientSession creates new ClientSession object.
NewConfig returns new Config object.
NewEEAcraServerMainComponent creates new SServer wrapper.
NewHTTPAPIServer creates new AcraAPIServer The arguments: - keystore is a keystore operated by the Acra - traceOn controls the tracing.
NewMetricConnectionCallback return initialized MetricConnectionCallback with proper connectionType.
RegisterMetrics registers AcraServer metrics.

# Constants

TimeoutToExit timeout for exit operation for SServer component.

# Variables

ErrShutdownAttemptWithoutExit is an error occurred when context cancelled but Exit function is not called.
ErrTwoDBSetup shows that AcraServer can connects only to one database at the same time.
ErrWaitTimeout error indicates that server was shutdown and waited N seconds while shutting down all connections.

# Structs

APICore contains the API logic of the HTTP API server Is used to decouple the API logic from actual HTTP setting routine In the future could be used to abstract HTTP setting up from API configuring.
ClientSession handles connection between database and AcraServer.
Config describes AcraServer configuration.
HTTPAPIServer handles all HTTP api logic.
SServer represents AcraServer server, connects with KeyStorage, configuration file, data and command connections (listeners, managers, file descriptors), and signals.

# Type aliases

ConnectionContextCallback is callback that is called to map context for each connection We use it to set the connection to the context, so it can be use latter (for extracting the clientID for example).