RemoteRepositorySource

class RemoteRepositorySource(url: String, headers: Map<String, String> = emptyMap()) : PluginRepositorySource, Closeable, KoinComponent

リモートのインデックス(index.json)からリポジトリグラフをたどってカタログを取得するソース

ルートのindexを取得し、その children を RepositoryGraphResolver で再帰的に読み取って 1つのカタログ(プラグイン名 -> 定義)に合成する。リポジトリ側にサーバーロジックは不要で、 静的ファイルとしてホスティングされたindexだけで動作する。

探索結果は一定時間キャッシュする。RepositoryManagerImpl は mpm add 1回で isAvailable と getRepositoryFile を複数回呼ぶため、毎回グラフをたどらないようにする。

Constructors

Link copied to clipboard
constructor(url: String, headers: Map<String, String> = emptyMap())

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()

HTTPクライアントを閉じてリソースを解放する reloadやプラグイン無効化時に呼び出し、コネクション/セレクタスレッドの リークを防ぐ

Link copied to clipboard
open suspend override fun getAvailablePlugins(): List<String>

利用可能なプラグインの一覧を取得 グラフ全体(子リポジトリ含む)から集めたプラグイン名を返す

Link copied to clipboard
open override fun getIdentifier(): String

リポジトリソースの識別子を取得

Link copied to clipboard
open fun getKoin(): Koin
Link copied to clipboard
open suspend override fun getRepositoryFile(pluginName: String): RepositoryFile?

指定したプラグインのリポジトリファイルを取得

Link copied to clipboard
open override fun getSourceType(): String

リポジトリソースの種類を取得

Link copied to clipboard
open suspend override fun isAvailable(): Boolean

リモートソースが利用可能かを確認 ルートのインデックスが取得・解析できれば利用可能とみなす