Configuration

io.github.positionpal.location.messages.RabbitMQ.Configuration
See theConfiguration companion trait
object Configuration

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply[F[_] : Sync](host: String, port: Int, username: String, password: String, virtualHost: String): F[ValidatedNec[ConfigurationError, Configuration]]

Create a new Configuration instance with the given parameters.

Create a new Configuration instance with the given parameters.

Type parameters

F

the effect type

Value parameters

host

the host RabbitMQ broker is running on

password

the password to authenticate with the RabbitMQ broker

port

the port RabbitMQ broker is listening on

username

the username to authenticate with the RabbitMQ broker

virtualHost

the virtual host to connect to on the RabbitMQ broker

Attributes

Returns

a ValidatedNec instance containing either a valid Configuration or a

def fromEnv[F[_] : Sync]: F[ValidatedNec[ConfigurationError, Configuration]]

Create a new Configuration instance with the parameters read from environment variables, expected in RABBITMQ_<PARAMETER> format.

Create a new Configuration instance with the parameters read from environment variables, expected in RABBITMQ_<PARAMETER> format.

Attributes

Returns

a ValidatedNec instance containing either a valid Configuration or a ConfigurationError in case of missing or invalid environment variables.