aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java
blob: e39a8cf38b79ae087b3c8bf92f5bae50a582084d (plain) (blame)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration;

import com.yahoo.config.provision.CloudName;
import com.yahoo.config.provision.HostName;
import com.yahoo.vespa.hosted.controller.api.identifiers.ControllerVersion;
import com.yahoo.vespa.hosted.controller.api.integration.archive.ArchiveService;
import com.yahoo.vespa.hosted.controller.api.integration.artifact.ArtifactRegistry;
import com.yahoo.vespa.hosted.controller.api.integration.athenz.AccessControlService;
import com.yahoo.vespa.hosted.controller.api.integration.aws.EnclaveAccessService;
import com.yahoo.vespa.hosted.controller.api.integration.aws.ResourceTagger;
import com.yahoo.vespa.hosted.controller.api.integration.aws.RoleService;
import com.yahoo.vespa.hosted.controller.api.integration.billing.BillingController;
import com.yahoo.vespa.hosted.controller.api.integration.billing.BillingDatabaseClient;
import com.yahoo.vespa.hosted.controller.api.integration.billing.BillingReporter;
import com.yahoo.vespa.hosted.controller.api.integration.billing.PlanRegistry;
import com.yahoo.vespa.hosted.controller.api.integration.certificates.EndpointCertificateProvider;
import com.yahoo.vespa.hosted.controller.api.integration.certificates.EndpointCertificateValidator;
import com.yahoo.vespa.hosted.controller.api.integration.configserver.ConfigServer;
import com.yahoo.vespa.hosted.controller.api.integration.deployment.ApplicationStore;
import com.yahoo.vespa.hosted.controller.api.integration.deployment.ArtifactRepository;
import com.yahoo.vespa.hosted.controller.api.integration.deployment.TesterCloud;
import com.yahoo.vespa.hosted.controller.api.integration.dns.NameService;
import com.yahoo.vespa.hosted.controller.api.integration.dns.VpcEndpointService;
import com.yahoo.vespa.hosted.controller.api.integration.entity.EntityService;
import com.yahoo.vespa.hosted.controller.api.integration.horizon.HorizonClient;
import com.yahoo.vespa.hosted.controller.api.integration.organization.ContactRetriever;
import com.yahoo.vespa.hosted.controller.api.integration.organization.DeploymentIssues;
import com.yahoo.vespa.hosted.controller.api.integration.organization.IssueHandler;
import com.yahoo.vespa.hosted.controller.api.integration.organization.Mailer;
import com.yahoo.vespa.hosted.controller.api.integration.organization.OwnershipIssues;
import com.yahoo.vespa.hosted.controller.api.integration.organization.SystemMonitor;
import com.yahoo.vespa.hosted.controller.api.integration.resource.CostReportConsumer;
import com.yahoo.vespa.hosted.controller.api.integration.resource.ResourceDatabaseClient;
import com.yahoo.vespa.hosted.controller.api.integration.secrets.EndpointSecretManager;
import com.yahoo.vespa.hosted.controller.api.integration.secrets.GcpSecretStore;
import com.yahoo.vespa.hosted.controller.api.integration.secrets.TenantSecretService;
import com.yahoo.vespa.hosted.controller.api.integration.user.RoleMaintainer;
import com.yahoo.vespa.hosted.controller.api.integration.vcmr.ChangeRequestClient;
import com.yahoo.vespa.hosted.controller.api.integration.zone.ZoneRegistry;

import java.time.Clock;
import java.util.Optional;

/**
 * This provides access to all service dependencies of the controller. Implementations of this are responsible for
 * constructing and configuring service implementations suitable for use by the controller.
 *
 * @author mpolden
 */
public interface ServiceRegistry {

    ConfigServer configServer();

    default Clock clock() { return Clock.systemUTC(); }

    default ControllerVersion controllerVersion() { return ControllerVersion.CURRENT; }

    default HostName getHostname() { return HostName.of(com.yahoo.net.HostName.getLocalhost()); }

    NameService nameService();

    VpcEndpointService vpcEndpointService();

    Mailer mailer();

    EndpointCertificateProvider endpointCertificateProvider();

    EndpointCertificateValidator endpointCertificateValidator();

    ContactRetriever contactRetriever();

    IssueHandler issueHandler();

    OwnershipIssues ownershipIssues();

    DeploymentIssues deploymentIssues();

    EntityService entityService();

    CostReportConsumer costReportConsumer();

    ArtifactRepository artifactRepository();

    TesterCloud testerCloud();

    ApplicationStore applicationStore();

    RunDataStore runDataStore();

    ZoneRegistry zoneRegistry();

    ConsoleUrls consoleUrls();

    ResourceTagger resourceTagger();

    EnclaveAccessService enclaveAccessService();

    RoleService roleService();

    SystemMonitor systemMonitor();

    BillingController billingController();

    ResourceDatabaseClient resourceDatabase();

    BillingDatabaseClient billingDatabase();

    Optional<? extends ArtifactRegistry> artifactRegistry(CloudName cloudName);

    TenantSecretService tenantSecretService();

    EndpointSecretManager secretManager();

    ArchiveService archiveService();

    ChangeRequestClient changeRequestClient();

    AccessControlService accessControlService();

    HorizonClient horizonClient();

    PlanRegistry planRegistry();

    RoleMaintainer roleMaintainer();

    GcpSecretStore gcpSecretStore();

    BillingReporter billingReporter();

}