public Follower(Node node) { if (node == null) { throw new ArgumentNullException("node"); } this.node = node; }
public Candidate(Node node) { if (node == null) { throw new ArgumentNullException("node"); } this.node = node; }
public string ConfigureAndStartRaft(string nodeId, IObservable<IEnumerable<Peer>> peerObservable) { thisServersNode = new Node(new NodeSettings(nodeId, TimeSpan.FromSeconds(1), TimeSpan.FromMilliseconds(100), peerObservable)); thisServersNode.Start(); return thisServersNode.Id; }
public void ConfigureApplication(IAppBuilder app, string nodeId, IObservable<IEnumerable<Peer>> peerObserver) { thisServersNode = new Node(new NodeSettings(nodeId, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(1), peerObserver)); var config = new HttpConfiguration(); var pocket = new PocketContainer(); config.ResolveDependenciesUsing(pocket); pocket.RegisterSingle(c => thisServersNode); config.MapHttpAttributeRoutes(); JsonSerialization(config); app.UseWebApi(config); thisServersNode.Start(); }
public DistributedLoggerController(Node node) { this.node = node; }