Commit Graph
14 Commits
Author SHA1 Message Date
Olaoluwa Osuntokun 1d1c1382d0 fn: add utility funcs/method for option type 2024-01-23 19:09:59 -08:00
Olaoluwa Osuntokun 1fc3f14467 fn: add new generic set container 2024-01-23 19:09:53 -08:00
Olaoluwa Osuntokun eb72bb9712 fn: add SendOrQuit 2024-01-23 19:09:50 -08:00
Olaoluwa Osuntokun a2694009cd fn: add basic generic chan recv utility funcs 2024-01-23 19:09:47 -08:00
Olaoluwa Osuntokun f7e2e6ddd6 fn: add basic generic queue 2024-01-23 19:09:45 -08:00
Olaoluwa Osuntokun f166829fe4 fn: add reduce func 2024-01-23 19:09:42 -08:00
Olaoluwa Osuntokun d702158d9b fn: add new EventPublisher event pub/sub system
This builds on the concurrent queue to create a generic way to allow
goroutines to pub/sub information. An example includes being notified
each time a state machine is able to carry out a new state transition.
2024-01-23 19:09:39 -08:00
Olaoluwa Osuntokun 1cbfda525a fn: add new Either[L, R] type
This implements a union of two values. Uses the existing option under
the hood, and adds a simple helper function.
2024-01-23 19:09:36 -08:00
Olaoluwa Osuntokun 0715e84f04 fn: add new ConcurrentQueue[T] data structure
This is a version of the queue we have elsewhere, but we can get rid of
all the casting and interface usage in favor of a type param.
2024-01-23 19:09:29 -08:00
Keagan McClelland 2499813414 fn: add UnsafeFromSome to Option API 2024-01-11 16:40:48 -08:00
Olaoluwa Osuntokun b0114efad3 fn: create new sub-module
In this commit, we make a new sub-module from the `fn` package. This
lets other projects use it w/o pulling in all of lnd, and also other
sub-packages within lnd.

We also add a temp replace directive for new module.  We'll remove this
once we tag the final version.
2023-12-06 17:00:10 -08:00
Keagan McClelland b298c84d21 fn: introduce option type
this commit introduces many of the most common functions you will
want to use with the Option type. Not all of them are used
immediately in this PR.
2023-11-10 13:29:30 -08:00
yyforyongyu 89b0e25e2c multi: add lnutils to host fundamental utility functions
We also move the `fn/stream.go` into the package `lnutils`. Eventually
we will put all the [utility
functions](https://github.com/lightninglabs/taro/tree/main/chanutils)
into this package.
2023-01-19 06:38:50 +08:00
Olaoluwa Osuntokun adb239300f fn: add new fn (func utils) package for generic helper funcs
We start with a simple Map function that can be useful for transforming
objects on the fly.

We may want to eventually make this Taro pakage into a module so we can
just have everything in one place:
https://github.com/lightninglabs/taro/tree/main/chanutils.
2022-12-15 11:56:31 -08:00