FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
frontend/rss/app/AppLoader.scala at test · devhttps/frontend · GitHub
devhttps
/
frontend
Public
forked from
guardian/frontend
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
frontend
/
rss
/
app
/
AppLoader.scala
Copy path
More file actions
More file actions
Latest commit
History
History
History
63 lines (54 loc) · 2.24 KB
Breadcrumbs
frontend
/
rss
/
app
/
AppLoader.scala
Copy path
File metadata and controls
63 lines (54 loc) · 2.24 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import
akka
.
actor
.
ActorSystem
import
app
.{
FrontendApplicationLoader
,
FrontendComponents
,
LifecycleComponent
}
import
com
.
softwaremill
.
macwire
.
_
import
common
.
_
import
common
.
Logback
.{
LogbackOperationsPool
,
LogstashLifecycle
}
import
conf
.
switches
.
SwitchboardLifecycle
import
conf
.
CachedHealthCheckLifeCycle
import
contentapi
.
_
import
controllers
.{
HealthCheck
,
RssController
}
import
dev
.
DevParametersHttpRequestHandler
import
http
.
CommonFilters
import
model
.
ApplicationIdentity
import
services
.
ophan
.
SurgingContentAgentLifecycle
import
play
.
api
.
ApplicationLoader
.
Context
import
play
.
api
.
BuiltInComponentsFromContext
import
play
.
api
.
http
.
HttpRequestHandler
import
play
.
api
.
mvc
.
EssentialFilter
import
play
.
api
.
routing
.
Router
import
services
.{
ConfigAgentLifecycle
,
OphanApi
}
import
router
.
Routes
class
AppLoader
extends
FrontendApplicationLoader
{
override
def
buildComponents
(
context
:
Context
)
:
FrontendComponents
=
new
BuiltInComponentsFromContext
(context)
with
AppComponents
}
trait
AppComponents
extends
FrontendComponents
{
//
Services
lazy
val
capiHttpClient
:
HttpClient
=
wire[
CapiHttpClient
]
lazy
val
contentApiClient
=
wire[
ContentApiClient
]
lazy
val
sectionsLookUp
=
wire[
SectionsLookUp
]
lazy
val
ophanApi
=
wire[
OphanApi
]
//
Controllers
lazy
val
healthCheck
=
wire[
HealthCheck
]
lazy
val
rssController
=
wire[
RssController
]
lazy
val
logbackOperationsPool
=
wire[
LogbackOperationsPool
]
override
lazy
val
lifecycleComponents
:
List
[
LifecycleComponent
]
=
List
(
wire[
LogstashLifecycle
],
wire[
ConfigAgentLifecycle
],
wire[
CloudWatchMetricsLifecycle
],
wire[
SurgingContentAgentLifecycle
],
wire[
SectionsLookUpLifecycle
],
wire[
SwitchboardLifecycle
],
wire[
CachedHealthCheckLifeCycle
]
)
lazy
val
router
:
Router
=
wire[
Routes
]
lazy
val
appIdentity
=
ApplicationIdentity
(
"
rss
"
)
override
lazy
val
appMetrics
=
ApplicationMetrics
(
ContentApiMetrics
.
HttpTimeoutCountMetric
,
ContentApiMetrics
.
HttpLatencyTimingMetric
,
ContentApiMetrics
.
ContentApiErrorMetric
,
ContentApiMetrics
.
ContentApiRequestsMetric
)
override
lazy
val
httpFilters
:
Seq
[
EssentialFilter
]
=
wire[
CommonFilters
].filters
override
lazy
val
httpRequestHandler
:
HttpRequestHandler
=
wire[
DevParametersHttpRequestHandler
]
def
actorSystem
:
ActorSystem
}
Back
|
FazBrowse Home
|
New Git URL