MCPcopy
hub / github.com/op/go-logging / ChannelMemoryBackend

Struct ChannelMemoryBackend

memory.go:130–140  ·  view source on GitHub ↗

ChannelMemoryBackend is very similar to the MemoryBackend, except that it internally utilizes a channel.

Source from the content-addressed store, hash-verified

128// ChannelMemoryBackend is very similar to the MemoryBackend, except that it
129// internally utilizes a channel.
130type ChannelMemoryBackend struct {
131 maxSize int
132 size int
133 incoming chan *Record
134 events chan event
135 mu sync.Mutex
136 running bool
137 flushWg sync.WaitGroup
138 stopWg sync.WaitGroup
139 head, tail *node
140}
141
142// NewChannelMemoryBackend creates a simple in-memory logging backend which
143// utilizes a go channel for communication.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected