Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
28 lines (24 sloc)
993 Bytes
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
package io.pager.lookup | |
import io.pager.client.github.GitHubClient | |
import io.pager.client.github.GitHubClient.GitHubClient | |
import io.pager.client.telegram.TelegramClient | |
import io.pager.client.telegram.TelegramClient.TelegramClient | |
import io.pager.log.Logger.Logger | |
import io.pager.log._ | |
import io.pager.subscription.SubscriptionLogic | |
import io.pager.subscription.SubscriptionLogic.SubscriptionLogic | |
import zio._ | |
import zio.macros.accessible | |
@accessible | |
object ReleaseChecker { | |
type ReleaseChecker = Has[Service] | |
trait Service { | |
def scheduleRefresh: Task[Unit] | |
} | |
type LiveDeps = Logger with GitHubClient with TelegramClient with SubscriptionLogic | |
def live: URLayer[LiveDeps, Has[Service]] = | |
ZLayer.fromServices[Logger.Service, GitHubClient.Service, TelegramClient.Service, SubscriptionLogic.Service, ReleaseChecker.Service] { | |
(logger, githubClient, telegramClient, subscriptionLogic) => | |
Live(logger, githubClient, telegramClient, subscriptionLogic) | |
} | |
} |