Global

Methods

buildHeader(props) → {Buffer}

Parameters:
Name Type Description
props EurekaHeader
Source:
Returns:
Type
Buffer

decodeHeader(buffer) → {EurekaHeader}

Parameters:
Name Type Description
buffer *
Source:
Returns:
Type
EurekaHeader

signHeader(header, crypto) → {Buffer}

Sign the contents of the header with the private key
Parameters:
Name Type Description
header Buffer
crypto EurekaCrypto
Source:
Returns:
signed header
Type
Buffer

verifyHeader(header, crypto) → {boolean}

Verify the contents of the buffer match the signature
Parameters:
Name Type Description
header Buffer
crypto EurekaCrypto
Source:
Returns:
true if the signature is valid
Type
boolean

Type Definitions

EurekaCryptoProps

Type:
  • Object
Properties:
Name Type Description
password string
salt string
algorithm string
keyId number
kdfFunction 'pbkdf2' | 'scrypt'
Source:

EurekaCryptoProps

Type:
  • Object
Properties:
Name Type Description
password string
salt string
algorithm 'chacha20-poly1305' | 'aes-256-gcm' | undefined
keyId number | undefined
kdfFunction 'scrypt' | 'pbkdf2' | undefined
Source:

EurekaHeader

Type:
  • Object
Properties:
Name Type Description
algorithm 'chacha20-poly1305' | 'aes-256-gcm'
version number
messageLength number
messageType 'BEACON'
keyId number
messageId messageId
signature Buffer
chunkSize number
chunkIndex number
Source:

EurekaProps

Type:
  • Object
Properties:
Name Type Description
server EurekaServerProps
crypto EurekaCryptoProps
logger Logger
Source:

EurekaServerProps

Type:
  • Object
Properties:
Name Type Description
type 'udp4' | 'udp6' | undefined
multicastGroups Array.<string> | undefined
interfaces Array.<string> | undefined
port number | undefined
chunkSize number | undefined
chunkSpacing number | undefined
Source:

Logger

Type:
  • Object
Properties:
Name Type Description
log function
info function
error function
warn function
debug function
trace function
Source: