forked from mirror/redcon
peekpipeline
This commit is contained in:
parent
ffebbd588e
commit
012cb08670
|
@ -81,7 +81,11 @@ type Conn interface {
|
|||
// }()
|
||||
Detach() DetachedConn
|
||||
// ReadPipeline returns all commands in current pipeline, if any
|
||||
// The commands are removed from the pipeline.
|
||||
ReadPipeline() []Command
|
||||
// ReadPipeline returns all commands in current pipeline, if any.
|
||||
// The commands remain in the pipeline.
|
||||
PeekPipeline() []Command
|
||||
}
|
||||
|
||||
// NewServer returns a new Redcon server.
|
||||
|
@ -278,6 +282,9 @@ func (c *conn) ReadPipeline() []Command {
|
|||
c.cmds = nil
|
||||
return cmds
|
||||
}
|
||||
func (c *conn) PeekPipeline() []Command {
|
||||
return c.cmds
|
||||
}
|
||||
|
||||
// DetachedConn represents a connection that is detached from the server
|
||||
type DetachedConn interface {
|
||||
|
|
Loading…
Reference in New Issue