MCPcopy Index your code
hub / github.com/eapache/channels

github.com/eapache/channels @v1.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.0 ↗ · + Follow
147 symbols 465 edges 18 files 40 documented · 27% 12 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

channels

Build Status GoDoc Code of Conduct

A collection of helper functions and special types for working with and extending Go's existing channels. Due to limitations of Go's type system, importing this library directly is often not practical for production code. It serves equally well, however, as a reference guide and template for implementing many common idioms; if you use it in this way I would appreciate the inclusion of some sort of credit in the resulting code.

See https://godoc.org/github.com/eapache/channels for full documentation or https://gopkg.in/eapache/channels.v1 for a versioned import path.

Requires Go version 1.1 or later, as certain necessary elements of the reflect package were not present in 1.0.

Most of the buffered channel types in this package are backed by a very fast queue implementation that used to be built into this package but has now been extracted into its own package at https://github.com/eapache/queue.

Note: Several types in this package provide so-called "infinite" buffers. Be very careful using these, as no buffer is truly infinite. If such a buffer grows too large your program will run out of memory and crash. Caveat emptor.

Extension points exported contracts — how you extend this code

Buffer (Interface)
Buffer is an interface for any channel that provides access to query the state of its buffer. Even unbuffered channels c [8 …
channels.go
SimpleInChannel (Interface)
SimpleInChannel is an interface representing a writeable channel that does not necessarily implement the Buffer interfac [8 …
channels.go
SimpleOutChannel (Interface)
SimpleOutChannel is an interface representing a readable channel that does not necessarily implement the Buffer interfac [7 …
channels.go
InChannel (Interface)
InChannel is an interface representing a writeable channel with a buffer.
channels.go
OutChannel (Interface)
OutChannel is an interface representing a readable channel implementing the Buffer interface.
channels.go

Core symbols most depended-on inside this repo

Out
called by 36
channels.go
NewNativeChannel
called by 31
native_channel.go
In
called by 29
channels.go
Close
called by 21
channels.go
NewResizableChannel
called by 8
resizable_channel.go
NewInfiniteChannel
called by 7
infinite_channel.go
NewChannel
called by 6
shared_buffer.go
NewOverflowingChannel
called by 5
overflowing_channel.go

Shape

Method 68
Function 59
Struct 9
Interface 7
TypeAlias 4

Languages

Go100%

Modules by API surface

channels.go27 symbols
native_channel.go23 symbols
channels_test.go17 symbols
shared_buffer.go11 symbols
ring_channel.go9 symbols
resizable_channel.go9 symbols
overflowing_channel.go9 symbols
infinite_channel.go8 symbols
batching_channel.go8 symbols
black_hole.go7 symbols
shared_buffer_test.go4 symbols
infinite_channel_test.go4 symbols

For agents

$ claude mcp add channels \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact