Many cleanups, additions and new ideas.
This commit is contained in:
parent
b308068617
commit
484ad6e3b3
13 changed files with 104 additions and 358 deletions
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
"""
|
||||
This file is part of Linspector (https://linspector.org/)
|
||||
Copyright (c) 2022 Johannes Findeisen <you@hanez.org>. All Rights Reserved.
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ See LICENSE.txt (MIT license).
|
|||
# TODO: Make this a backend API using the modern FastAPI framework as a replacement for the
|
||||
# traditional RPC plugin. Maybe it makes sense to maintain the RPC plugin too for simple usage by
|
||||
# the Lish but I believe it makes sense to only create one backend for all clients.
|
||||
from fastapi import FastAPI
|
||||
from linspector.core.plugin import Plugin
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ from linspector.core.plugin import Plugin
|
|||
|
||||
|
||||
def create(configuration, environment, linspector, log):
|
||||
return HTTPServerPlugin(configuration, environment, linspector, log)
|
||||
return HTTPDPlugin(configuration, environment, linspector, log)
|
||||
|
||||
|
||||
# TODO: check for all required configuration options and set defaults if needed.
|
||||
class HTTPServerPlugin(Plugin):
|
||||
class HTTPDPlugin(Plugin):
|
||||
|
||||
def __init__(self, configuration, environment, linspector, log):
|
||||
super().__init__(configuration, environment, linspector, log)
|
||||
26
linspector/plugins/lish.py
Normal file
26
linspector/plugins/lish.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
"""
|
||||
This file is part of Linspector (https://linspector.org/)
|
||||
Copyright (c) 2022 Johannes Findeisen <you@hanez.org>. All Rights Reserved.
|
||||
See LICENSE.txt (MIT license).
|
||||
"""
|
||||
# TODO: This plugin should become the internal Lish implemented as a plugin which does not use the
|
||||
# API plugin but loads at the end when starting Linspector in interactive mode as a terminal like
|
||||
# interface to the core of Linspector.
|
||||
from linspector.core.plugin import Plugin
|
||||
|
||||
|
||||
def create(configuration, environment, linspector, log):
|
||||
return LishPlugin(configuration, environment, linspector, log)
|
||||
|
||||
|
||||
# TODO: check for all required configuration options and set defaults if needed.
|
||||
class LishPlugin(Plugin):
|
||||
def __init__(self, configuration, environment, linspector, log):
|
||||
super().__init__(configuration, environment, linspector, log)
|
||||
self.__configuration = configuration
|
||||
self.__environment = environment
|
||||
self.__linspector = linspector
|
||||
self.__log = log
|
||||
|
||||
def run(self):
|
||||
return
|
||||
|
|
@ -12,7 +12,6 @@ def create(configuration, environment, log):
|
|||
|
||||
# TODO: check for all required configuration options and set defaults if needed.
|
||||
class FileTask(Task):
|
||||
|
||||
def __init__(self, configuration, environment, log):
|
||||
super().__init__(configuration, environment, log)
|
||||
self.__configuration = configuration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue