Skip to content

Releases: opensauceryafrica/horizon

Dilation - V1.0.1

29 Feb 16:22

Choose a tag to compare

Changes

  • modified go.mod file

Dilation - v1.0.0

23 Sep 13:58

Choose a tag to compare

Summary

This version of Horizon includes the following

Docs

  • Improved documentation in readme for better use case understanding
  • Added more comment to the provided code sample

Features

NewFuture

Creates a new future along the horizon. It optionally takes a mode argument which can be one of the following:

  • horizon.Einstein - This ensures that the future will not panic in any case of timeline interference.

  • horizon.Hawking - This allows the future to panic in the case of timeline interference.

RegisterComplete

Takes a function of the form func(interface{}){} as an argument and registers it as a callback for when the future is signaled to as complete.

RegisterError

Takes a function of the form func(interface{}){} as an argument and registers it as a callback for when the future is signaled to as an error.

RegisterFinally

Gets called when the future is signaled to as complete or error. It takes a function of the form func(){} as an argument. It's clear that no data is sent to the past via the horizon when this this is called.

SignalComplete

Takes a single argument of type interface{} and signals the future as complete. The argument is sent to the past via the horizon.

SignalError

Takes a single argument of type interface{} and signals the future as error. The argument is sent to the past via the horizon.

Schwarzschild

Schwarzschild creates a warps in the horizon such that the runtime blocks until signaled off. This signal off simply changes the coordinate away from the schwarzschild radius.

Openheimer

Openheimer shifts the horion radius away from the schwarzschild radius and towards the einstein radius. This allows the future's horizon to be unblocked and the runtime to continue.

SignalCount

Returns the number of signals sent to the future. This could be useful for debugging

Alter

Changes the future, branching off to a new timeline. All signals are still registered but event histories are lost

BlackHole

Closes the future. All signals are lost, all branched timelines are pruned and the future is no longer usable

Events

Returns all the events returned from the future via the horizon