- Removed the deprecated
github.com/mariomac/pipes/pkg/node
,github.com/mariomac/pipes/pkg/graph
packages.- If you were using
v0.9.0
, usev0.10.0
as a transitioning version.
- If you were using
- Deprecated the node and graph API and created a simpler, type-safer, unified pipe package.
- Deprecated packages:
github.com/mariomac/pipes/pkg/node
,github.com/mariomac/pipes/pkg/graph
. - New package
github.com/mariomac/pipes/pipe
- Next version of the pipes library will completely remove node and graph package, so use this version as a transitive version for porting from deprecated packages to new packages.
- Deprecated packages:
- Old documentation has been completely removed. New documentation will be released soon.
- Low-level API: start and middle node output demuxers
- High-level API: start and middle node output demuxers
- Known limitation: Codecs won't work, as the demux output is dynamically created at build time from the destination node inputs. It will cause a panic inside the demuxed node if the DemuxGet[T1] type is different from the type that Pipe's used to invoke DemuxAdd[T2]
- High-Level: You don't need the
nodeId
annotation. If undefined, it takes the struct name by default. - BREAKING CHANGE: we don't inspect anymore array/slice types, element by element. Instead, use StartMultiProvider and, when we do it, TerminalMultiprovider (we will decide what to do with MiddleMultiProvider).
- BREAKING CHANGE: Removed
context.Context
arguments from the API:builder.Build
,graph.Run
,AsStartCtx
, etc... including the changes added in v0.7.0: Provider functions do not need a context anymore. From now on, if you want to handle contexts or other shared global data, you should use wrappers for the producer functions. - BREAKING CHANGE: low-level
SendsTo
method has been renamed toSendTo
, for consistency with the high-level annotation.
- BREAKING CHANGE: StartProvider, MiddleProvider and TermProvider now accept a context that is
can be enriched by the sender nodes, and can return an error that would cause the pipe build
to return error.
- Consequently,
builder.Build
also requires a context to be invoked.
- Consequently,
- Also, providers can return an error as second return value. If any provider returns an error, the graph Build method will also return an error.
- As an initial, unstable API, we allow defining multiple Start functions into a start node. After some evaluation, we will implement also multiple MIddle and Terminal functions that behave as a single node.
- High-level API nodes do not need to implement
Instancer
if you define anodeId
tag in the config struct that defines them. - An
InstaceID == '-'
ornodeId:"-"
will ignore this field from the graph. - Graph configs does not need to implement
ConnectedConfig
interface if their properties define thesendTo
configuration. - Graph builder returns error if nodes remain unconnected
- Graph builder returns error if a node sends data to itself
- A node config implementing
Enabler
interface can allow users disabling nodes without requiring pointers. - Disabled or nil nodes can forward the received data by using the
forwardTo
annotation.
- High-level graph API add contexts to the
graph.Run(context.Context)
library, and - Start providers in High-level API must return a
StartFuncCtx[OUT]
function instead of aStartFunc[OUT]
- In version 1.0 maybe StartFunc is replaced by StartFuncCtx and we force the usage of contexts always
- Context propagation. Added:
StartFuncCtx[OUT]
type,AsStartCtx
function andStartCtx
method.
- High-Level API: when the builder can't connect nodes with different types, it returns an error instead of panicking.
- High-Level API: Instancer constraint in Providers' CFG
- Autopiping high-level graph API
- Breaking changes:
node.Init
renamed tonode.Start
- Inter-node communication input channels are now unbuffered by default. To make them buffered,
you can append the
node.ChannelBufferLen
function to theAsMiddle
andAsTerminal
functions.
- Ported to Go 1.18 and generics for faster and safer execution.
- Added InType and OutType inspection functions to the Nodes
- Initial import from github.com/mariomac/go-pipes