ChannelMemoryBackend is very similar to the MemoryBackend, except that it internally utilizes a channel.
| 128 | // ChannelMemoryBackend is very similar to the MemoryBackend, except that it |
| 129 | // internally utilizes a channel. |
| 130 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected