[upd] plankton
This commit is contained in:
parent
2135dfff1f
commit
baffdf891c
2 changed files with 306 additions and 156 deletions
33
lib/plankton/plankton.d.ts
vendored
33
lib/plankton/plankton.d.ts
vendored
|
@ -3005,13 +3005,13 @@ declare namespace lib_plankton.http {
|
|||
* @author fenris <frass@greenscale.de>
|
||||
*/
|
||||
enum enum_method {
|
||||
get = "get",
|
||||
post = "post",
|
||||
patch = "patch",
|
||||
put = "put",
|
||||
delete = "delete",
|
||||
options = "options",
|
||||
head = "head"
|
||||
head = "head",
|
||||
get = "get",
|
||||
delete = "delete",
|
||||
post = "post",
|
||||
put = "put",
|
||||
patch = "patch"
|
||||
}
|
||||
/**
|
||||
* @author fenris <frass@greenscale.de>
|
||||
|
@ -3305,16 +3305,28 @@ declare namespace lib_plankton.server {
|
|||
* @author fenris
|
||||
*/
|
||||
type type_subject = {
|
||||
host: string;
|
||||
port: int;
|
||||
handle: ((input: string, metadata?: type_metadata) => Promise<string>);
|
||||
threshold: (null | float);
|
||||
handle: ((input: Buffer, metadata?: type_metadata) => Promise<string>);
|
||||
serverobj: any;
|
||||
};
|
||||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
function make(port: int, handle: ((input: string, metadata?: type_metadata) => Promise<string>)): type_subject;
|
||||
function make(handle: ((input: string, metadata?: type_metadata) => Promise<string>), options?: {
|
||||
host?: string;
|
||||
port?: int;
|
||||
threshold?: (null | float);
|
||||
}): type_subject;
|
||||
/**
|
||||
* @author fenris
|
||||
* @deprecated
|
||||
*/
|
||||
function make_old(port: int, handle: ((input: string, metadata?: type_metadata) => Promise<string>)): type_subject;
|
||||
/**
|
||||
* @author fenris
|
||||
* @see https://nodejs.org/api/net.html#serverlistenport-host-backlog-callback
|
||||
*/
|
||||
function start(subject: type_subject): Promise<void>;
|
||||
/**
|
||||
|
@ -3334,7 +3346,10 @@ declare namespace lib_plankton.server {
|
|||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
constructor(port: int, handle: ((input: string) => Promise<string>));
|
||||
constructor(handle: ((input: Buffer, metadata?: type_metadata) => Promise<string>), options?: {
|
||||
host?: string;
|
||||
port?: int;
|
||||
});
|
||||
/**
|
||||
* @author fenris
|
||||
*/
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue