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