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

Add a Mock Layer8 #520

Closed
stravid87 opened this issue Aug 16, 2024 · 2 comments
Closed

Add a Mock Layer8 #520

stravid87 opened this issue Aug 16, 2024 · 2 comments
Assignees
Labels
Difficulty: Intermediate Intermediate level Type: Enhancement Enhancement to existing feature
Milestone

Comments

@stravid87
Copy link
Collaborator

stravid87 commented Aug 16, 2024

Description
The Layer8 Interceptor has become a performance bottleneck such that testing other optimizations is difficult because of it's operation. The purpose of this issue is to create a mock for layer8 that can still access the functionality of statsAPI but without the E2E encryption that it provides.

Acceptance Criteria

  1. An mock NPM module that takes the place of the Layer8_interceptor and Layer8_middlware so that, once reintroduced, the real Interceptor and Middleware can be easily slotted back in.
  2. The mock should expose all the same functionality as Layer8 currently:
export interface Layer8 {
    testWASM(arg: any): Promise<any>,
    persistenceCheck(): Promise<any>,
    initEncryptedTunnel(config: Layer8Config): Promise<boolean>,
    static(url: string): Promise<string>,
    fetch(input: RequestInfo | URL, init?: RequestInit | undefined): Promise<Response>
}
@stravid87
Copy link
Collaborator Author

UPDATE
only functions necessary Init, fetch (test, persistence & static unnecessary)

@marclupanc
Copy link
Collaborator

Implemented in #524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: Intermediate Intermediate level Type: Enhancement Enhancement to existing feature
Development

No branches or pull requests

3 participants