MCPcopy Create free account

hub / github.com/Primetalk/goio / functions

Functions426 in github.com/Primetalk/goio

↓ 1 callersFunctionNewSink
NewSink constructs the sink from the provided function.
stream/pipe.go:30
↓ 1 callersFunctionNewStepResultFinished
NewStepResultFinished constructs a finished StepResult. The continuation will be empty as well.
stream/stream.go:47
↓ 1 callersFunctionNewStreamEventFinished
()
stream/stream_event.go:16
↓ 1 callersFunctionNot
Not negates the given predicate.
fun/predicate.go:14
↓ 1 callersFunctionNotifyToChannel
NotifyToChannel sends message to channel after specified duration.
io/time.go:55
↓ 1 callersFunctionOnError
OnError executes a side effect when there is an error.
io/error_handling.go:33
↓ 1 callersFunctionPairParallel
PairParallel runs two IOs in parallel and returns both results.
io/parallel.go:61
↓ 1 callersFunctionPairSwap
PairSwap returns a pair with swapped parts.
fun/pair.go:29
↓ 1 callersFunctionPartition
Partition separates elements in as according to the predicate.
slice/slice.go:70
↓ 1 callersFunctionPartition
Partition divides the stream into two that are handled independently.
stream/execution.go:137
↓ 1 callersFunctionPipeToPairOfChannels
PipeToPairOfChannels converts a streaming pipe to a pair of channels that could be used to interact with external systems.
stream/channels.go:80
↓ 1 callersFunctionReadOnlyFile
ReadOnlyFile returns a resource for the specified filename.
text/file.go:12
↓ 1 callersFunctionReduce
Reduce aggregates all elements pairwise. Only works for non empty slices.
slice/slice.go:43
↓ 1 callersFunctionRemove
Remove removes any elements in r from as.
slice/slice.go:287
↓ 1 callersMethodRequestOneItem
RequestOneItem - sends notification to backpressure channel and receives one item from data channel.
stream/backpressure_channels.go:111
↓ 1 callersFunctionRunAlso
RunAlso runs the other IO in parallel, but returns only the result of the first IO.
io/parallel.go:91
↓ 1 callersFunctionSideEval
SideEval executes a computation for each element for it's side effect. Could be used for logging, for instance.
stream/stream.go:118
↓ 1 callersMethodStart
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 callersFunctionStateFlatMap
StateFlatMap maintains state along the way.
stream/stream.go:220
↓ 1 callersFunctionSwap
Swap returns a curried function with swapped order of arguments.
fun/fun.go:20
↓ 1 callersFunctionTail
Tail returns tail of the slice.
slice/slice.go:326
↓ 1 callersFunctionTake
Take returns at most n elements.
slice/slice.go:267
↓ 1 callersFunctionTakeAndTail
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 callersFunctionTakeWhile
TakeWhile returns the beginning of the stream such that all elements satisfy the predicate.
stream/lengthy.go:44
↓ 1 callersFunctionThrough
Through passes the stream data through the pipe. Technically it applies the pipe function to this stream.
stream/pipe.go:17
↓ 1 callersFunctionToBackPressureChannels
ToBackPressureChannels sends each element to all channels.
stream/backpressure_channels.go:138
↓ 1 callersFunctionToSink
ToSink streams all data from the stream to the sink.
stream/pipe.go:40
↓ 1 callersFunctionToString
ToString converts the value to string using `Sprintf` `%v`.
fun/fun.go:43
↓ 1 callersFunctionUnboundedExecutionContext
UnboundedExecutionContext runs each task in a new go routine.
io/execution_context.go:51
↓ 1 callersFunctionUnion
Union returns elements that are either in as or in as2.
slice/slice.go:299
↓ 1 callersFunctionUnsafeIO
(t *testing.T, ioa io.IO[A])
transaction/common_test.go:15
↓ 1 callersFunctionUnsafeIOExpectError
(t *testing.T, expected error, ioa io.IO[A])
transaction/common_test.go:21
↓ 1 callersFunctionWrapf
Wrapf wraps errors produced by this stream with additional context info.
stream/stream.go:495
↓ 1 callersFunctionWriteByteChunks
WriteByteChunks writes byte chunks to writer.
text/write.go:13
↓ 1 callersFunctionWriteLines
WriteLines creates a sink that receives strings and saves them to writer. It adds \n after each line.
text/write.go:39
↓ 1 callersFunctionZipWith
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 callersFunctionZipWithIndex
ZipWithIndex prepends the index to each element.
stream/zip.go:9
↓ 1 callersMethodcomplete
()
stream/pool.go:114
↓ 1 callersMethodincInput
(ctx context.Context)
stream/pool.go:87
↓ 1 callersMethodincOutput
()
stream/pool.go:107
↓ 1 callersFunctionindexOf
(element A, data []A)
text/read.go:69
↓ 1 callersFunctionmyFunc
()
fun/errors_test.go:20
↓ 1 callersFunctionsplitBy
splitBy returns at least one part when separator is not found. Even if len(data) == 0.
text/read.go:80
FunctionBenchmarkForSum
(b *testing.B)
stream/stream_bench_test.go:33
FunctionBenchmarkSliceSum
(b *testing.B)
stream/stream_bench_test.go:26
FunctionBenchmarkStreamSum
(b *testing.B)
stream/stream_bench_test.go:12
FunctionBracket
Bracket executes user computation with transactional guarantee. If user computation is successful - commit is executed. Otherwise - rollback.
transaction/bracket.go:13
FunctionCast
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
FunctionChannelBufferPipe
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
FunctionChunkN
ChunkN groups elements by n and produces a stream of slices.
stream/chunks.go:9
FunctionChunksResize
ChunksResize rebuffers chunks to the given size.
stream/chunks.go:35
MethodClose
Close stops receiving new tasks. Subsequent start invocations will fail.
io/execution_context.go:24
MethodClose
()
io/execution_context.go:42
MethodClose
()
io/fiber.go:51
MethodClose
()
io/fiber.go:124
MethodClose
()
stream/backpressure_channels.go:83
FunctionCoMap
CoMap changes the input argument of the consumer.
io/consumer.go:7
FunctionCompose
Compose executes the given functions in sequence.
fun/fun.go:48
FunctionConst
Const creates a function that will ignore it's input and return the specified value.
fun/fun.go:8
FunctionEmptyUnit
EmptyUnit returns an empty stream of units. It's more performant because the same instance is being used.
stream/construct.go:17
FunctionFail
Fail[A] constructs an IO[A] that fails with the given error.
io/io.go:156
FunctionFail
Fail creates a resource that will fail during acquisition.
resource/resource.go:129
FunctionFail
Fail returns a stream that fails immediately.
stream/stream.go:329
FunctionFailedFiber
FailedFiber creates a fiber that will fail on Join or Close with the given error.
io/fiber.go:114
FunctionFanOutOld
FanOut distributes the same element to all handlers. Stream failure is also distribured to all handlers.
stream/stream.go:418
FunctionFlatMapErr
FlatMapErr converts IO[A] result using a function that might fail. It seems to be identical to MapErr.
io/io.go:132
FunctionFlatten
Flatten simplifies a stream of streams to just the stream of values by concatenating all inner streams.
stream/stream.go:215
FunctionFoldErr
FoldErr folds IO using simple Go-style functions that might fail.
io/io.go:184
FunctionFromSideEffectfulFunction
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
FunctionIsEven
(i int)
slice/slice_test.go:11
FunctionIsNegative
(i int)
slice/slice_test.go:18
FunctionIsPositive
(i int)
slice/slice_test.go:15
FunctionIsRight
IsRight checks whether the provided Either is right or not.
either/either.go:34
MethodJoin
()
io/fiber.go:38
MethodJoin
()
io/fiber.go:120
FunctionJoinManyFibers
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
FunctionLazyFinishedStepResult
LazyFinishedStepResult returns
stream/stream.go:81
FunctionLeft
Left constructs Either that is left.
either/either.go:13
FunctionLen
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
FunctionMakeUnbufferedChannel
MakeUnbufferedChannel allocates a new unbufered channel.
io/channels.go:21
FunctionNever
Never is a simple IO that never returns.
io/time.go:38
FunctionNewBackpressureChannel
()
stream/backpressure_channels.go:56
FunctionNewFailedGoResult
NewFailedGoResult constructs a GoResult with an error.
io/goresult.go:18
FunctionNewPool
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
FunctionNewPoolFromExecutionContext
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
FunctionNewResourceFromIOClosable
NewResourceFromIOClosable - is an internal function that constructs a resource from closable IO.
resource/resource.go:61
FunctionNewStreamEventError
(err error)
stream/stream_event.go:20
FunctionNewUnorderedPoolFromExecutionContext
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
FunctionNone
None constructs an option without value.
option/option.go:12
FunctionNothing
Nothing panics. However, can be used anywhere where type A is needed.
fun/fun.go:56
FunctionPairV1
PairV1 returns the first element of the pair.
fun/pair.go:13
FunctionPairV2
PairV2 returns the second element of the pair.
fun/pair.go:16
FunctionParallelInExecutionContext
ParallelInExecutionContext starts the given IOs in the provided `ExecutionContext` and waits for all results.
io/parallel.go:12
FunctionPrependPipeToSink
PrependPipeToSink changes the input of a sink.
stream/pipe.go:52
FunctionReadLinesWithNonFinishedLine
ReadLinesWithLastNonFinishedLine reads text file line-by-line. Also returns the last line that is not terminated by '\n'
text/read.go:106
FunctionRight
Right constructs Either that is right.
either/either.go:21
MethodSendError
(err error)
stream/backpressure_channels.go:67
MethodSendValue
(a A)
stream/backpressure_channels.go:63
FunctionSequenceUnit
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
MethodStart
Start returns an IO which will return immediately when executed. It'll place the runnable into this execution context.
io/execution_context.go:34
← previousnext →201–300 of 426, ranked by callers