Skip to content
Permalink
Browse files

Tidy up and additional documentation, and shell definition for OnEven…

…t pipeline extension.
  • Loading branch information...
paulstancer committed Nov 24, 2017
1 parent 8c93bb7 commit bff97a89eb1566faff3ba7b7080d48dfeeac45ca
@@ -78,7 +78,7 @@ If you are new to Microservice development, then the following links gives you a
Xigadee is made up of a set of libraries, which are listed below. They support different areas of Microservice functionality. These capabilities can be added to your project through the relevant [NuGet](https://www.nuget.org/packages?q=Tags%3A%22Xigadee%22) packages.

* [Xigadee](Src/Xigadee.Platform/_Docs/Introduction.md)
- This is the core root library that is used to create Microservice and serverless based solutions.
- This is the core root library that is used to create Microservice based solutions.
* [Xigadee Azure](Src/Xigadee.Azure/_docs/Introduction.md)
- This library allows for the seamless integration with many of the Azure platform PAAS services.
* [Xigadee Api Server](Src/Xigadee.Api.Server/_docs/Introduction.md)
@@ -1,25 +1,6 @@
#region Copyright
// Copyright Hitachi Consulting
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xigadee;

namespace Xigadee
{
@@ -175,7 +156,7 @@ public virtual void Flush()

#region Security
/// <summary>
/// This is a reference to the security service used for encrpytion.
/// This is a reference to the security service used for encryption.
/// </summary>
public ISecurityService Security
{
@@ -1,26 +1,4 @@
#region Copyright
// Copyright Hitachi Consulting
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xigadee;
using System.Collections.Concurrent;

namespace Xigadee
{
@@ -57,23 +35,41 @@ protected override void SupportLoadDefault()

SupportAdd(DataCollectionSupport.ApiBoundary, (e) => EventsBoundary.Add(e));
}

/// <summary>
/// Gets or sets the EventSource loggers.
/// </summary>
public ConcurrentBag<EventHolder> EventsEventSource { get; set; } = new ConcurrentBag<EventHolder>();

/// <summary>
/// Gets or sets the boundary events loggers.
/// </summary>
public ConcurrentBag<EventHolder> EventsBoundary { get; set; } = new ConcurrentBag<EventHolder>();

/// <summary>
/// Gets or sets the dispatcher events loggers.
/// </summary>
public ConcurrentBag<EventHolder> EventsDispatcher { get; set; } = new ConcurrentBag<EventHolder>();

/// <summary>
/// Gets or sets the log events loggers.
/// </summary>
public ConcurrentBag<EventHolder> EventsLog { get; set; } = new ConcurrentBag<EventHolder>();

/// <summary>
/// Gets or sets the events metric loggers.
/// </summary>
public ConcurrentBag<EventHolder> EventsMetric { get; set; } = new ConcurrentBag<EventHolder>();

/// <summary>
/// Gets or sets the microservice events loggers.
/// </summary>
public ConcurrentBag<EventHolder> EventsMicroservice { get; set; } = new ConcurrentBag<EventHolder>();

/// <summary>
/// Gets or sets the custom events loggers.
/// </summary>
public ConcurrentBag<EventHolder> EventsCustom { get; set; } = new ConcurrentBag<EventHolder>();

/// <summary>
/// Gets or sets the security events loggers.
/// </summary>
public ConcurrentBag<EventHolder> EventsSecurity { get; set; } = new ConcurrentBag<EventHolder>();

/// <summary>
/// Gets or sets the resource events loggers.
/// </summary>
public ConcurrentBag<EventHolder> EventsResource { get; set; } = new ConcurrentBag<EventHolder>();

}
@@ -29,7 +29,7 @@ public partial class Microservice
/// This method logs the current status as part of the time poll.
/// </summary>
/// <returns></returns>
protected async Task LogStatistics()
protected Task LogStatistics()
{
try
{
@@ -42,6 +42,8 @@ protected async Task LogStatistics()
//We're not going to throw any exception here
mDataCollection?.LogException("LogStatistics unhandled exception", ex);
}

return Task.FromResult(0);
}
#endregion
#region StatisticsRecalculate()
@@ -1,20 +1,4 @@
#region Copyright
// Copyright Hitachi Consulting
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System;

namespace Xigadee
{
@@ -26,7 +10,7 @@ public static partial class CorePipelineExtensions
/// <param name="pipeline">The incoming pipeline.</param>
/// <param name="msInspect">An action to inspect the Microservice</param>
/// <param name="cfInspect">An action to inspect the configuration.</param>
/// <returns>The passthrough of the pipeline.</returns>
/// <returns>The pass through of the pipeline.</returns>
public static P Inspect<P>(this P pipeline
, Action<IMicroservice> msInspect = null
, Action<IEnvironmentConfiguration> cfInspect = null)
@@ -0,0 +1,28 @@

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Xigadee
{
public static partial class CorePipelineExtensions
{
/// <summary>
/// This extension allows for specific events to be inspected.
/// </summary>
/// <param name="pipeline">The incoming pipeline.</param>
/// <param name="action">An action to process the event.</param>
/// <param name="evFilter">A filter function to specify the event types that can be processed.</param>
/// <returns>The pass-through of the pipeline.</returns>
public static P OnEvent<P>(this P pipeline
, Action<EventArgs> action = null
, Func<EventArgs, bool> evFilter = null)
where P : IPipeline
{

return pipeline;
}
}
}
@@ -0,0 +1,18 @@
![Xigadee](../../../docs/X2a.png)

# Xigadee on Linux and the Raspberry Pi

This section is a guide to setting up Xigadee on ARM based Linux distros such as the Raspberry Pi. Raspberry Pi comes with two many types of Linux. For this post I have tested it using two specific distros: [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) and [Ubuntu Mate](https://ubuntu-mate.org/raspberry-pi/), and this post will explain the differences and how to set up .NET Core on both.

You can also use this as a guide to setting up Xigadee apps to run on standard x64, x86 based Linux environments.

## Platform
Currently .NET Core supports ARM based processors in [preview](https://github.com/dotnet/announcements/issues/29) that support ARM7.1 or higher. This means that the framework can be run on the Raspberry Pi 2 & 3, but I have not tested on the Pi Zero, and I believe it will not work due to the use of an older ARM6 architecture.

## Getting started


<table><tr>
<td>Created by: <a href="http://github.com/paulstancer">Paul Stancer</a></td>
<td><a href="../../../README.md">Home</a></td>
</tr></table>
@@ -148,7 +148,6 @@ p2.Start();
Here we have replaced the manual communication bridge with a Service Bus communication.

<table><tr>
<td><a href="http://www.hitachiconsulting.com"><img src="../../../docs/hitachi.png" alt="Hitachi Consulting" height="50"/></a></td>
<td>Created by: <a href="http://github.com/paulstancer">Paul Stancer</a></td>
<td><a href="../../../README.md">Home</a></td>
</tr></table>

0 comments on commit bff97a8

Please sign in to comment.
You can’t perform that action at this time.