forked from jlandersen/vscode-kafka
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes jlandersen#123 Signed-off-by: azerr <[email protected]>
- Loading branch information
1 parent
bf47c3d
commit e4d1f46
Showing
9 changed files
with
397 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"title": "Kafka contributions to package.json", | ||
"type": "object", | ||
"properties": { | ||
"contributes": { | ||
"type": "object", | ||
"properties": { | ||
"kafka": { | ||
"type": "object", | ||
"markdownDescription": "Kafka extensions", | ||
"properties": { | ||
"clusterProviders": { | ||
"type": "array", | ||
"markdownDescription": "Cluster providers definitions.", | ||
"items": [ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"description": "Cluster provider id." | ||
}, | ||
"label": { | ||
"type": "string", | ||
"description": "Cluster provider label." | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Kafka } from "kafkajs"; | ||
import { Cluster, ConnectionOptions } from "../client/client"; | ||
import { ClusterSettings } from "../settings/clusters"; | ||
|
||
export interface ClusterProviderProcessorProvider { | ||
|
||
getClusterProviderProcessor(clusterProviderId: string) : ClusterProviderProcessor; | ||
|
||
} | ||
|
||
/** | ||
* The cluster provider processor. | ||
*/ | ||
export interface ClusterProviderProcessor { | ||
|
||
/** | ||
* Returns the clusters managed by the processor which must be added to the kafka explorer. | ||
* | ||
* @param clusterSettings the cluster settings. | ||
*/ | ||
collectClusters(clusterSettings: ClusterSettings): Promise<Cluster[] | undefined>; | ||
|
||
/** | ||
* Create the Kafka JS client instance fromthe given connection options. | ||
* When processor doesn't implement this method, the Kafka JS client | ||
* instance is created with the default client factory from the vscode-kafka. | ||
* | ||
* @param connectionOptions the connection options. | ||
*/ | ||
createKafka?(connectionOptions: ConnectionOptions): Kafka; | ||
} |
Oops, something went wrong.