public HostManager(IAwsCredential awsCredential, PlatformDb db, IEventLogger eventLog) { Validate.NotNull(awsCredential, nameof(awsCredential)); this.db = db ?? throw new ArgumentNullException(nameof(db)); this.eventLog = eventLog ?? throw new ArgumentNullException(nameof(eventLog)); var region = AwsRegion.USEast1; // TODO: Configurable ec2 = new Ec2Client(region, awsCredential); ssm = new SsmClient(region, awsCredential); var elb = new ElbClient(region, awsCredential); this.clusterService = new ClusterService(db); this.clusterManager = new ClusterManager(clusterService, elb, eventLog); this.hostService = new HostService(db); this.imageService = new ImageService(db); this.hostTemplateService = new HostTemplateService(db); }
public ClusterManager(IClusterService clusterService, ElbClient elbClient, IEventLogger eventLog) { this.clusterService = clusterService ?? throw new ArgumentNullException(nameof(clusterService)); this.elbClient = elbClient ?? throw new ArgumentNullException(nameof(elbClient)); this.eventLog = eventLog ?? throw new ArgumentNullException(nameof(eventLog)); }