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 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, millVersion: Option[String] = ...): 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 => Unit, log: String => Unit, openSocket: Boolean, millVersion: Option[String] = ...): 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

millVersion

If provided, checks that any existing daemon has a matching version. If mismatched, terminates the old daemon 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