Skip to content

Commit

Permalink
Add utils on proxy state
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin committed Feb 29, 2024
1 parent ff12a7b commit 289c719
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions otoroshi/app/next/proxy/state.scala
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ class NgProxyState(env: Env) {
def allStoredBackends(): Seq[StoredNgBackend] = ngbackends.values.toSeq
def allBackends(): Seq[NgBackend] = backends.values.toSeq

def hasCert(id: String): Boolean = certificates.contains(id)
def addCert(id: String, cert: Cert): Unit = {
certificates.put(id, cert)
}

def updateRawRoutes(values: Seq[NgRoute]): Unit = {
raw_routes
.addAll(values.map(v => (v.cacheableId, v)))
Expand Down

0 comments on commit 289c719

Please sign in to comment.