Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeService #38

Open
Snider opened this issue Dec 20, 2021 · 0 comments
Open

RuntimeService #38

Snider opened this issue Dec 20, 2021 · 0 comments

Comments

@Snider
Copy link
Collaborator

Snider commented Dec 20, 2021

New service to be the point of call for environment settings

So I don't write bad code because it's faster.
https://github.com/letheanVPN/server/blob/670c360fb092de1c67d03ae628a5f337705e5dd9/src/services/config/store.ts#L17

export class RuntimeService {

    static environment: { path:string, os: string, iw0:boolean, last_error: DateTime, hsm: boolean}
   
    isErrorState()  // last_error.length > 0
    domainSeperator() // os == win ? '\\' : '/'
    objectModel() // return 'json'
    connectionState() // (ifg0.state() & iw0.state()) && ldks.syncedToLastTx()
    canQuit() // await ProcessManager.hasActive()
    shutDown() // await ProcessManger.shutdown()
    panic() // ProcessManager.shotdown()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant