Click or drag to resize

IDockerFeature Interface

Represents a grouping of features which can be configured via Docker environment variable

Namespace: SanteDB.Docker.Core
Assembly: SanteDB.Docker.Core (in SanteDB.Docker.Core.dll) Version: 3.0.2081-alpha+33b80aa7f95e24a6799613bc47257a05ef96e81a
Syntax
public interface IDockerFeature

The IDockerFeature type exposes the following members.

Properties
 NameDescription
Public propertyId Gets the identifier of the feature
Public propertySettings Get a list of settings allowed for this object
Top
Methods
 NameDescription
Public methodConfigure Configure the feature for execution in Docker
Top
Remarks

This interface allows a plugin to expose one or more services via the SDB_ENABLE=x,y,z environment variable. When the docker host encounters the Id in SDB_ENABLE it calls the Configure(SanteDBConfiguration, IDictionaryString, String) method.

Example
// This feature is enabled when the user sets SDB_FEATURE=my public class MyDockerFeature : IDockerFeature { // identifier which appears in the SDB_FEATURE list public string Id => "my"; // settings which this feature accepts in format my_setting public IEnumerable<String> Settings => new String[] { "setting" }; // Perform the configuration public void Configure(SanteDBConfiguration configuration, IDictionary<String, String> settings) { Console.WriteLine("Thanks for using my docker feature plugin!"); if(settings.TryGetValue("setting", out String setting) { Console.WriteLine("You've used the setting {0}", setting); } } }
See Also