aboutsummaryrefslogtreecommitdiff
path: root/Plugins/CacheBroker/CacheBrokerEntry.cs
blob: 762f66be6a13041f6efe7a29216ddd4603519b7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.IO;
using System.Collections.Generic;

using VNLib.Utils.Logging;
using VNLib.Plugins.Cache.Broker.Endpoints;
using VNLib.Plugins.Extensions.Loading.Routing;

namespace VNLib.Plugins.Cache.Broker
{
    public sealed class CacheBrokerEntry : PluginBase
    {
        public override string PluginName => "Cache.Broker";

        protected override void OnLoad()
        {
            try
            {
                this.Route<BrokerRegistrationEndpoint>();

                Log.Information("Plugin loaded");
            }
            catch (FileNotFoundException)
            {
                Log.Error("Public key file was not found at the specified path");
            }
            catch (KeyNotFoundException knf)
            {
                Log.Error("Required configuration keys were not found {mess}", knf.Message);
            }
        }

        protected override void OnUnLoad()
        {
            Log.Debug("Plugin unloaded");
        }

        protected override void ProcessHostCommand(string cmd)
        {
            throw new NotImplementedException();
        }
    }
}