![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@flytio/int-sdk
Advanced tools
A standard library for integrations in Flyt. The library aims to help to speed up future integrations by extracting common parts. This way in case of any update you don't have to update the code, but only the version of the library. See original proposal.
The library sets up some things for you.
It runs an express server on port 8080 to expose metrics and liveness probe.
/metrics
/healthz
It creates a GRPC server and assigns your implementation to its services.
It registers Prometheus metrics and places some counters and histograms (using prom-client package) into the integration calls.
It exports HttpClientFactory that sets interceptors with a logger, and metrics and configures default timeout.
It also exports wrappers for Menu and Ordering services that simplify passing logger and httpInsntace down to the integration so you don't have to think about extracting requestId
from metadata.
You have to create a LoggerFactory
instance that is shared between the integration factory and your implementation. This way you can keep the logs under the same app name. Also you may want to create an httpClient instance using LoggerFactory
insntace to make use of metrics and logs already set up using interceptors.
import {
IntegrationFactory,
LoggerFactory,
HttpClientFactory,
OrderingServiceWrapper,
OrderingService,
} from '@flytio/int-sdk';
import { MyOrderingImplementation, APP_NAME } from './src/my-class';
// 1. create a logger factory instance
const loggerFactory = new LoggerFactory(APP_NAME);
// 2. use logger factory instance to create http client factory instance
const httpClientFactory = new HttpClientFactory(loggerFactory);
// 3. MyOrderingImplementation implements
// OrderingService exported from @flytio/int-sdk
const myOrdering = new MyOrderingImplementation();
// 4. OrderingServiceWrapper implements
// OrderingGrpcService exported from @flytio/protos
const ordering = new OrderingServiceWrapper(
myOrdering,
loggerFactory,
httpClientFactory,
);
// 5. create an integration
const integration = new IntegrationFactory({
loggerFactory,
appName: APP_NAME,
ordering,
});
// 6. and make grpc server and http server listen
integration.run();
We use prettier to format code before commit (using husky hooks).
For testing we use Jest. Unit tests are placed inside __tests__
directory. Integration tests are placed in __integration-tests__
directory.
The library is distributed as an npm package
and publishing happens automatically through CircleCI after merging to master.
We follow semantic versioning approach. To ensure you bump the version number there is a script to run before you push.
FAQs
Standard library used for various integrations
The npm package @flytio/int-sdk receives a total of 0 weekly downloads. As such, @flytio/int-sdk popularity was classified as not popular.
We found that @flytio/int-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.