orbit-server / orbit.server / OrbitServerConfig

OrbitServerConfig

data class OrbitServerConfig

Constructors

<init>

OrbitServerConfig(serverInfo: LocalServerInfo = LocalServerInfo( port = System.getenv("ORBIT_PORT")?.toInt(10) ?: 50056, url = System.getenv("ORBIT_URL") ?: "localhost:50056" ), tickRate: Duration = Duration.ofSeconds(1), pipelineRailCount: Int = 32, pipelineBufferCount: Int = 10_000, clock: Clock = Clock(), nodeLeaseDuration: LeaseDuration = LeaseDuration(10), addressableLeaseDuration: LeaseDuration = LeaseDuration(600), cpuPool: CoroutineDispatcher = Pools.createFixedPool("orbit-cpu"), ioPool: CoroutineDispatcher = Pools.createCachedPool("orbit-io"), acquireShutdownLatch: Boolean = true, nodeDirectory: ExternallyConfigured<NodeDirectory> = LocalNodeDirectory.LocalNodeDirectorySingleton, addressableDirectory: ExternallyConfigured<AddressableDirectory> = LocalAddressableDirectory.LocalAddressableDirectorySingleton, meterRegistry: ExternallyConfigured<MeterRegistry> = LocalMeterRegistry.LocalMeterRegistrySingleton, containerOverrides: ComponentContainerRoot.() -> Unit = { })

Properties

acquireShutdownLatch

Prevents the JVM shutting down when the main thread exits.

val acquireShutdownLatch: Boolean

addressableDirectory

The addressable directory to use

val addressableDirectory: ExternallyConfigured<AddressableDirectory>

addressableLeaseDuration

Expiration times for addressable leases

val addressableLeaseDuration: LeaseDuration

clock

Server's application clock

val clock: Clock

containerOverrides

Optional hook to update container registrations after initialization

val containerOverrides: ComponentContainerRoot.() -> Unit

cpuPool

The pool where CPU intensive tasks will run.

val cpuPool: CoroutineDispatcher

ioPool

The pool where IO intensive tasks will run.

val ioPool: CoroutineDispatcher

meterRegistry

The meter registry implementation for sending application metrics

val meterRegistry: ExternallyConfigured<MeterRegistry>

nodeDirectory

The node directory to use.

val nodeDirectory: ExternallyConfigured<NodeDirectory>

nodeLeaseDuration

Expiration times for node leases

val nodeLeaseDuration: LeaseDuration

pipelineBufferCount

The number of messages (either inbound or outbound) that may be queued before new messages are rejected.

val pipelineBufferCount: Int

pipelineRailCount

The number of workers that can process a message concurrently.

val pipelineRailCount: Int

serverInfo

The port to expose for connections and the advertised url for reaching this mesh node

val serverInfo: LocalServerInfo

tickRate

The Orbit tick rate.

val tickRate: Duration