-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade Kubernetes client and use more cats effect
- Loading branch information
Showing
43 changed files
with
1,198 additions
and
1,191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
orkestra-core/.js/src/main/scala/tech/orkestra/OrkestraServer.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
package tech.orkestra | ||
|
||
import cats.effect.{ExitCode, IO, IOApp} | ||
import tech.orkestra.board.Board | ||
import tech.orkestra.css.AppCss | ||
import tech.orkestra.route.WebRouter | ||
import com.goyeau.kubernetes.client.KubernetesClient | ||
import com.sksamuel.elastic4s.http.ElasticClient | ||
import org.scalajs.dom | ||
|
||
/** | ||
* Mix in this trait to create the Orkestra server. | ||
*/ | ||
trait OrkestraServer[F[_]] extends OrkestraPlugin { | ||
trait OrkestraServer extends IOApp with OrkestraPlugin[IO] { | ||
implicit override def orkestraConfig: OrkestraConfig = ??? | ||
implicit override def kubernetesClient: KubernetesClient = ??? | ||
implicit override def elasticsearchClient: ElasticClient = ??? | ||
|
||
def board: Board | ||
|
||
def main(args: Array[String]): Unit = { | ||
def run(args: List[String]): IO[ExitCode] = IO { | ||
AppCss.load() | ||
WebRouter.router(board).renderIntoDOM(dom.document.getElementById(BuildInfo.projectName.toLowerCase)) | ||
ExitCode.Success | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
orkestra-core/src/main/scala/tech/orkestra/OrkestraPlugin.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package tech.orkestra | ||
|
||
import scala.concurrent.Future | ||
import cats.Applicative | ||
import com.goyeau.kubernetes.client.KubernetesClient | ||
import com.sksamuel.elastic4s.http.ElasticClient | ||
import tech.orkestra.model.RunInfo | ||
|
||
trait OrkestraPlugin { | ||
trait OrkestraPlugin[F[_]] { | ||
implicit protected def F: Applicative[F] | ||
implicit protected def orkestraConfig: OrkestraConfig | ||
implicit protected def kubernetesClient: KubernetesClient | ||
implicit protected def elasticsearchClient: ElasticClient | ||
|
||
def onMasterStart(): Future[Unit] = Future.unit | ||
def onJobStart(runInfo: RunInfo): Future[Unit] = Future.unit | ||
def onMasterStart(kubernetesClient: KubernetesClient[F]): F[Unit] = Applicative[F].unit | ||
def onJobStart(runInfo: RunInfo): F[Unit] = Applicative[F].unit | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.