Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Primetalk/goio
/ functions
Functions
426 in github.com/Primetalk/goio
⨍
Functions
426
◇
Types & classes
31
↓ 1 callers
Function
NewSink
NewSink constructs the sink from the provided function.
stream/pipe.go:30
↓ 1 callers
Function
NewStepResultFinished
NewStepResultFinished constructs a finished StepResult. The continuation will be empty as well.
stream/stream.go:47
↓ 1 callers
Function
NewStreamEventFinished
()
stream/stream_event.go:16
↓ 1 callers
Function
Not
Not negates the given predicate.
fun/predicate.go:14
↓ 1 callers
Function
NotifyToChannel
NotifyToChannel sends message to channel after specified duration.
io/time.go:55
↓ 1 callers
Function
OnError
OnError executes a side effect when there is an error.
io/error_handling.go:33
↓ 1 callers
Function
PairParallel
PairParallel runs two IOs in parallel and returns both results.
io/parallel.go:61
↓ 1 callers
Function
PairSwap
PairSwap returns a pair with swapped parts.
fun/pair.go:29
↓ 1 callers
Function
Partition
Partition separates elements in as according to the predicate.
slice/slice.go:70
↓ 1 callers
Function
Partition
Partition divides the stream into two that are handled independently.
stream/execution.go:137
↓ 1 callers
Function
PipeToPairOfChannels
PipeToPairOfChannels converts a streaming pipe to a pair of channels that could be used to interact with external systems.
stream/channels.go:80
↓ 1 callers
Function
ReadOnlyFile
ReadOnlyFile returns a resource for the specified filename.
text/file.go:12
↓ 1 callers
Function
Reduce
Reduce aggregates all elements pairwise. Only works for non empty slices.
slice/slice.go:43
↓ 1 callers
Function
Remove
Remove removes any elements in r from as.
slice/slice.go:287
↓ 1 callers
Method
RequestOneItem
RequestOneItem - sends notification to backpressure channel and receives one item from data channel.
stream/backpressure_channels.go:111
↓ 1 callers
Function
RunAlso
RunAlso runs the other IO in parallel, but returns only the result of the first IO.
io/parallel.go:91
↓ 1 callers
Function
SideEval
SideEval executes a computation for each element for it's side effect. Could be used for logging, for instance.
stream/stream.go:118
↓ 1 callers
Method
Start
Start returns an IO which will return immediately when executed. It'll place the runnable into this execution context.
io/execution_context.go:22
↓ 1 callers
Function
StateFlatMap
StateFlatMap maintains state along the way.
stream/stream.go:220
↓ 1 callers
Function
Swap
Swap returns a curried function with swapped order of arguments.
fun/fun.go:20
↓ 1 callers
Function
Tail
Tail returns tail of the slice.
slice/slice.go:326
↓ 1 callers
Function
Take
Take returns at most n elements.
slice/slice.go:267
↓ 1 callers
Function
TakeAndTail
TakeAndTail collects n leading elements of the stream and returns them along with the tail of the stream. If the stream is shorter, then only availabl
stream/execution.go:163
↓ 1 callers
Function
TakeWhile
TakeWhile returns the beginning of the stream such that all elements satisfy the predicate.
stream/lengthy.go:44
↓ 1 callers
Function
Through
Through passes the stream data through the pipe. Technically it applies the pipe function to this stream.
stream/pipe.go:17
↓ 1 callers
Function
ToBackPressureChannels
ToBackPressureChannels sends each element to all channels.
stream/backpressure_channels.go:138
↓ 1 callers
Function
ToSink
ToSink streams all data from the stream to the sink.
stream/pipe.go:40
↓ 1 callers
Function
ToString
ToString converts the value to string using `Sprintf` `%v`.
fun/fun.go:43
↓ 1 callers
Function
UnboundedExecutionContext
UnboundedExecutionContext runs each task in a new go routine.
io/execution_context.go:51
↓ 1 callers
Function
Union
Union returns elements that are either in as or in as2.
slice/slice.go:299
↓ 1 callers
Function
UnsafeIO
(t *testing.T, ioa io.IO[A])
transaction/common_test.go:15
↓ 1 callers
Function
UnsafeIOExpectError
(t *testing.T, expected error, ioa io.IO[A])
transaction/common_test.go:21
↓ 1 callers
Function
Wrapf
Wrapf wraps errors produced by this stream with additional context info.
stream/stream.go:495
↓ 1 callers
Function
WriteByteChunks
WriteByteChunks writes byte chunks to writer.
text/write.go:13
↓ 1 callers
Function
WriteLines
WriteLines creates a sink that receives strings and saves them to writer. It adds \n after each line.
text/write.go:39
↓ 1 callers
Function
ZipWith
ZipWith returns a slice of pairs made of elements of the two slices. The length of the result is min of both.
slice/slice.go:233
↓ 1 callers
Function
ZipWithIndex
ZipWithIndex prepends the index to each element.
stream/zip.go:9
↓ 1 callers
Method
complete
()
stream/pool.go:114
↓ 1 callers
Method
incInput
(ctx context.Context)
stream/pool.go:87
↓ 1 callers
Method
incOutput
()
stream/pool.go:107
↓ 1 callers
Function
indexOf
(element A, data []A)
text/read.go:69
↓ 1 callers
Function
myFunc
()
fun/errors_test.go:20
↓ 1 callers
Function
splitBy
splitBy returns at least one part when separator is not found. Even if len(data) == 0.
text/read.go:80
Function
BenchmarkForSum
(b *testing.B)
stream/stream_bench_test.go:33
Function
BenchmarkSliceSum
(b *testing.B)
stream/stream_bench_test.go:26
Function
BenchmarkStreamSum
(b *testing.B)
stream/stream_bench_test.go:12
Function
Bracket
Bracket executes user computation with transactional guarantee. If user computation is successful - commit is executed. Otherwise - rollback.
transaction/bracket.go:13
Function
Cast
Cast converts interface {} to ordinary type A. It'a simple operation i.(A) represented as a function. In case the conversion is not possible, returns
fun/cast.go:13
Function
ChannelBufferPipe
ChannelBufferPipe puts incoming values into a buffer of the given size and then reads from that same buffer. This buffer allows to decouple producer a
stream/channels.go:98
Function
ChunkN
ChunkN groups elements by n and produces a stream of slices.
stream/chunks.go:9
Function
ChunksResize
ChunksResize rebuffers chunks to the given size.
stream/chunks.go:35
Method
Close
Close stops receiving new tasks. Subsequent start invocations will fail.
io/execution_context.go:24
Method
Close
()
io/execution_context.go:42
Method
Close
()
io/fiber.go:51
Method
Close
()
io/fiber.go:124
Method
Close
()
stream/backpressure_channels.go:83
Function
CoMap
CoMap changes the input argument of the consumer.
io/consumer.go:7
Function
Compose
Compose executes the given functions in sequence.
fun/fun.go:48
Function
Const
Const creates a function that will ignore it's input and return the specified value.
fun/fun.go:8
Function
EmptyUnit
EmptyUnit returns an empty stream of units. It's more performant because the same instance is being used.
stream/construct.go:17
Function
Fail
Fail[A] constructs an IO[A] that fails with the given error.
io/io.go:156
Function
Fail
Fail creates a resource that will fail during acquisition.
resource/resource.go:129
Function
Fail
Fail returns a stream that fails immediately.
stream/stream.go:329
Function
FailedFiber
FailedFiber creates a fiber that will fail on Join or Close with the given error.
io/fiber.go:114
Function
FanOutOld
FanOut distributes the same element to all handlers. Stream failure is also distribured to all handlers.
stream/stream.go:418
Function
FlatMapErr
FlatMapErr converts IO[A] result using a function that might fail. It seems to be identical to MapErr.
io/io.go:132
Function
Flatten
Flatten simplifies a stream of streams to just the stream of values by concatenating all inner streams.
stream/stream.go:215
Function
FoldErr
FoldErr folds IO using simple Go-style functions that might fail.
io/io.go:184
Function
FromSideEffectfulFunction
FromSideEffectfulFunction constructs a stream from a Go-style function. It is expected that this function is not pure and can return different results
stream/construct.go:75
Function
IsEven
(i int)
slice/slice_test.go:11
Function
IsNegative
(i int)
slice/slice_test.go:18
Function
IsPositive
(i int)
slice/slice_test.go:15
Function
IsRight
IsRight checks whether the provided Either is right or not.
either/either.go:34
Method
Join
()
io/fiber.go:38
Method
Join
()
io/fiber.go:120
Function
JoinManyFibers
JoinManyFibers starts a separate go-routine for each incoming Fiber. As soon as result is ready it is sent to output. At any point in time at most cap
stream/pool.go:124
Function
LazyFinishedStepResult
LazyFinishedStepResult returns
stream/stream.go:81
Function
Left
Left constructs Either that is left.
either/either.go:13
Function
Len
Len returns the length of the slice. This is a normal function that can be passed around unlike the built-in `len`.
slice/slice.go:176
Function
MakeUnbufferedChannel
MakeUnbufferedChannel allocates a new unbufered channel.
io/channels.go:21
Function
Never
Never is a simple IO that never returns.
io/time.go:38
Function
NewBackpressureChannel
()
stream/backpressure_channels.go:56
Function
NewFailedGoResult
NewFailedGoResult constructs a GoResult with an error.
io/goresult.go:18
Function
NewPool
Pool is a pipe capable of running tasks in parallel. type Pool[A any] Pipe[io.IO[A], io.GoResult[A]] NewPool creates an execution pool that will execu
stream/pool.go:20
Function
NewPoolFromExecutionContext
NewPoolFromExecutionContext creates an execution pool that will execute tasks concurrently. After the execution context a buffer is created to allow a
stream/pool.go:57
Function
NewResourceFromIOClosable
NewResourceFromIOClosable - is an internal function that constructs a resource from closable IO.
resource/resource.go:61
Function
NewStreamEventError
(err error)
stream/stream_event.go:20
Function
NewUnorderedPoolFromExecutionContext
NewUnorderedPoolFromExecutionContext creates an execution pool that will execute tasks concurrently. Each task's result will be passed to a channel as
stream/pool.go:154
Function
None
None constructs an option without value.
option/option.go:12
Function
Nothing
Nothing panics. However, can be used anywhere where type A is needed.
fun/fun.go:56
Function
PairV1
PairV1 returns the first element of the pair.
fun/pair.go:13
Function
PairV2
PairV2 returns the second element of the pair.
fun/pair.go:16
Function
ParallelInExecutionContext
ParallelInExecutionContext starts the given IOs in the provided `ExecutionContext` and waits for all results.
io/parallel.go:12
Function
PrependPipeToSink
PrependPipeToSink changes the input of a sink.
stream/pipe.go:52
Function
ReadLinesWithNonFinishedLine
ReadLinesWithLastNonFinishedLine reads text file line-by-line. Also returns the last line that is not terminated by '\n'
text/read.go:106
Function
Right
Right constructs Either that is right.
either/either.go:21
Method
SendError
(err error)
stream/backpressure_channels.go:67
Method
SendValue
(a A)
stream/backpressure_channels.go:63
Function
SequenceUnit
SequenceUnit takes a slice of IO units and returns IO that executes all of them. It'll fail if any of the internal computations fail.
io/io.go:208
Method
Start
Start returns an IO which will return immediately when executed. It'll place the runnable into this execution context.
io/execution_context.go:34
← previous
next →
201–300 of 426, ranked by callers