-
-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
412 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import ServiceBroker = require("../service-broker"); | ||
import Registry = require("./registry"); | ||
import Node = require("./node"); | ||
|
||
import Endpoint = require("./endpoint"); | ||
import type Service = require("../service"); | ||
import type { ActionSchema } from "../service"; | ||
|
||
declare class ActionEndpoint extends Endpoint { | ||
service: Service; | ||
action: ActionSchema; | ||
|
||
constructor(registry: Registry, broker: ServiceBroker, node: Node, service: Service, action: any); | ||
|
||
update(action: ActionSchema): void; | ||
} | ||
export = ActionEndpoint; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import ServiceBroker = require("../service-broker"); | ||
import Registry = require("./registry"); | ||
import Node = require("./node"); | ||
|
||
import Endpoint = require("./endpoint"); | ||
import type Service = require("../service"); | ||
import type { EventSchema } from "../context"; | ||
import type { ServiceEvent } from "../service"; | ||
|
||
declare class EventEndpoint extends Endpoint { | ||
service: Service; | ||
event: EventSchema; | ||
event: ServiceEvent; | ||
|
||
constructor(registry: Registry, broker: ServiceBroker, node: Node, service: Service, event: ServiceEvent); | ||
|
||
update(event: ServiceEvent): void; | ||
} | ||
export = EventEndpoint; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,39 @@ | ||
import BaseStrategy = require("../strategies/base"); | ||
import Node = require("./node"); | ||
import Endpoint = require("./endpoint"); | ||
import ActionEndpoint = require("./endpoint-action"); | ||
import EventEndpoint = require("./endpoint-event"); | ||
import ServiceItem = require("./service-item"); | ||
import { Registry, ServiceBroker } from "./event-catalog"; | ||
import Context = require("../context"); | ||
|
||
declare class EndpointList { | ||
constructor(registry: Registry, broker: ServiceBroker, name: string, group: string, EndPointFactory?: typeof Endpoint, StrategyFactory?: BaseStrategy, strategyOptions?: Record<string, any>); | ||
|
||
registry: Registry; | ||
broker: ServiceBroker; | ||
strategy: typeof BaseStrategy; | ||
name: string; | ||
group: string; | ||
internal: boolean; | ||
EndPointFactory: typeof Endpoint; | ||
endpoints: (ActionEndpoint | EventEndpoint)[]; | ||
localEndpoints: (ActionEndpoint | EventEndpoint)[]; | ||
|
||
constructor(registry: Registry, broker: ServiceBroker, name: string, group: string, EndPointFactory?: typeof Endpoint, StrategyFactory?: typeof BaseStrategy, strategyOptions?: Record<string, any>); | ||
|
||
add(node: Node, service: ServiceItem, data: any): Endpoint; | ||
getFirst(): Endpoint | null; | ||
select(list: Array<Endpoint>, ctx: Context): Endpoint | null; | ||
next(ctx: Context): Endpoint | null; | ||
nextLocal(ctx: Context): Endpoint | null; | ||
|
||
hasAvailable(): boolean; | ||
hasLocal(): boolean; | ||
setLocalEndpoints(): void; | ||
count(): number; | ||
|
||
getEndpointByNodeID(nodeID: string): Endpoint | null; | ||
hasNodeID(nodeID: string): boolean; | ||
removeByService(service: ServiceItem): void; | ||
removeByNodeID(nodeID: string): void; | ||
} | ||
export = EndpointList; |
Oops, something went wrong.