Browse Source

Provide API IPC clients a default service name to remove unnecessary abstraction

dev
David Ludwig 4 years ago
parent
commit
944b64e4c9
2 changed files with 14 additions and 4 deletions
  1. +7
    -2
      api/search/src/IpcClient.ts
  2. +7
    -2
      api/torrent/src/IpcClient.ts

+ 7
- 2
api/search/src/IpcClient.ts View File

@ -2,12 +2,17 @@ import { IpcClientService } from "@autoplex/ipc";
import { Microservice } from "@autoplex/microservice";
import { SOCKET_PATH } from "./constants";
export abstract class IpcClient<M extends Microservice = Microservice> extends IpcClientService<M>
export class IpcClient<M extends Microservice = Microservice> extends IpcClientService<M>
{
/**
* The name of the service
*/
public readonly NAME = "Search";
/**
* The path to the socket file
*/
protected SOCKET_PATH = SOCKET_PATH;
protected readonly SOCKET_PATH = SOCKET_PATH;
/**
* Get the details of a movie


+ 7
- 2
api/torrent/src/IpcClient.ts View File

@ -3,12 +3,17 @@ import { Microservice } from "@autoplex/microservice";
import { SOCKET_PATH } from "./constants";
import { ISerializedTorrent, ITorrent } from "./schema";
export abstract class IpcClient<M extends Microservice = Microservice> extends IpcClientService<M>
export class IpcClient<M extends Microservice = Microservice> extends IpcClientService<M>
{
/**
* The name of the service
*/
public readonly NAME = "Torrent";
/**
* The path to the socket file
*/
protected SOCKET_PATH = SOCKET_PATH;
protected readonly SOCKET_PATH = SOCKET_PATH;
/**
* Add a torrent to the client


Loading…
Cancel
Save