0.1.0 • Published 2 years ago

coreai-network v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Core Network

A framework for quickly implementing core network protocols.

Goal

Be able to load this framework and start building a service network.

  • load as npm package
  • import core

API

Core converts a function's inputs and outputs into network messages.

Core(function, group)

group - the channel the Core function broadcasts to, like namespacing default = "core"

Example

const { Core } = require('./main')

function Generator() {
    let message = "Hello! now: " + Date.now()
    return new Promise(resolve => setTimeout(() => resolve(message), 1000))
}

function Listener(data) {
    // have to process for all possible inputs
    console.log("Heard: ", data)
}

Core(Listener)
Core(Generator)

Dependencies

0.1.0

2 years ago

0.0.22

2 years ago

0.0.21

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago