예제 #1
0
        public async Task GetNodeInfo()
        {
            using (ServerStore.ContextPool.AllocateOperationContext(out TransactionOperationContext context))
                await using (var writer = new AsyncBlittableJsonTextWriter(context, ResponseBodyStream()))
                {
                    var nodeInfo = ServerStore.GetNodeInfo();
                    var json     = nodeInfo.ToJson();
                    json[nameof(ServerStore.Engine.LastStateChangeReason)] = ServerStore.LastStateChangeReason();

                    context.Write(writer, json);
                }
        }