ServerLauncher

mill.client.ServerLauncher

Client side code that interacts with Server.scala in order to launch a generic long-lived background daemon.

Attributes

Source
ServerLauncher.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class DaemonConfig(millVersion: String, javaVersion: String, jvmOpts: Seq[String], millRepositories: Seq[String])

Configuration that affects whether a daemon needs to be restarted. If any of these values change between client invocations, the daemon should restart.

Configuration that affects whether a daemon needs to be restarted. If any of these values change between client invocations, the daemon should restart.

Attributes

Companion
object
Source
ServerLauncher.scala
Supertypes
trait Serializable
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object DaemonConfig

Attributes

Companion
class
Source
ServerLauncher.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
case class Launched(port: Int, socket: Option[Socket], launchedServer: LaunchedServer) extends AutoCloseable

Attributes

Source
ServerLauncher.scala
Supertypes
trait Serializable
trait Serializable
trait Product
trait Equals
trait AutoCloseable
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def ensureServerIsRunning(locks: Locks, daemonDir: Path, initServer: () => LaunchedServer, timeoutMillis: Long, log: String => Unit, config: DaemonConfig): ServerLaunchResult

Attempts to start a server process using initServer if needed.

Attempts to start a server process using initServer if needed.

Attributes

Source
ServerLauncher.scala
def launchOrConnectToServer(locks: Locks, daemonDir: Path, serverInitWaitMillis: Int, initServer: () => LaunchedServer, onFailure: ServerDied => Nothing, log: String => Unit, openSocket: Boolean, config: DaemonConfig): Launched

Establishes a connection to the Mill server by acquiring necessary locks and potentially starting a new server process if one is not already running.

Establishes a connection to the Mill server by acquiring necessary locks and potentially starting a new server process if one is not already running.

Value parameters

config

Configuration to check against the running daemon. If any values mismatch, the old daemon is terminated before starting a new one.

Attributes

Source
ServerLauncher.scala
def retryWithTimeout[A](timeoutMillis: Long, errorMessage: String)(supplier: () => Option[A]): A

Attributes

Source
ServerLauncher.scala
def runWithConnection[A](connection: Socket, closeConnectionAfterClientLogic: Boolean, sendInitData: OutputStream => Unit, runClientLogic: (BufferedInputStream, BufferedOutputStream) => A): A

Run client logic with a connection established to a Mill server.

Run client logic with a connection established to a Mill server.

Attributes

Source
ServerLauncher.scala