@@ -196,13 +196,13 @@ func (ln *Listener) unlisten(ctx context.Context, cn *Conn, channels ...string)
196196}
197197
198198// Receive indefinitely waits for a notification. This is low-level API
199- // and in most cases Channel should be used instead.
199+ // and in most cases CreateChannel should be used instead.
200200func (ln * Listener ) Receive (ctx context.Context ) (channel string , payload string , err error ) {
201201 return ln .ReceiveTimeout (ctx , 0 )
202202}
203203
204204// ReceiveTimeout waits for a notification until timeout is reached.
205- // This is low-level API and in most cases Channel should be used instead.
205+ // This is low-level API and in most cases CreateChannel should be used instead.
206206func (ln * Listener ) ReceiveTimeout (
207207 ctx context.Context , timeout time.Duration ,
208208) (channel , payload string , err error ) {
@@ -226,12 +226,12 @@ func (ln *Listener) ReceiveTimeout(
226226 return channel , payload , nil
227227}
228228
229- // Channel returns a channel for concurrently receiving notifications.
229+ // CreateChannel creates and returns a channel for concurrently receiving notifications.
230230// It periodically sends Ping notification to test connection health.
231231//
232232// The channel is closed with Listener. Receive* APIs can not be used
233233// after channel is created.
234- func (ln * Listener ) Channel (opts ... ChannelOption ) <- chan Notification {
234+ func (ln * Listener ) CreateChannel (opts ... ChannelOption ) <- chan Notification {
235235 return newChannel (ln , opts ).ch
236236}
237237
0 commit comments