diff options
author | Valery Piashchynski <[email protected]> | 2021-06-30 11:08:40 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-06-30 11:08:40 +0300 |
commit | 2ac3b240b118961c1a30cc18dd22d08b7fac6516 (patch) | |
tree | 25f48908286a05ea78e4049d89f88450d0541f99 /pkg/priority_queue | |
parent | c0f808bb8c7077e18aa197f024628b9912def58b (diff) |
- Update arch diagrams
- Update ephemeral plugin
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/priority_queue')
-rw-r--r-- | pkg/priority_queue/interface.go | 3 | ||||
-rw-r--r-- | pkg/priority_queue/queue.go | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/pkg/priority_queue/interface.go b/pkg/priority_queue/interface.go index 5945a013..00998d78 100644 --- a/pkg/priority_queue/interface.go +++ b/pkg/priority_queue/interface.go @@ -1,7 +1,6 @@ package priorityqueue type Queue interface { - Push() + Push(item interface{}) Pop() interface{} - BLPop() } diff --git a/pkg/priority_queue/queue.go b/pkg/priority_queue/queue.go index 79afab18..c12acbf6 100644 --- a/pkg/priority_queue/queue.go +++ b/pkg/priority_queue/queue.go @@ -1,15 +1,17 @@ package priorityqueue +import "fmt" + type QueueImpl struct { } func NewPriorityQueue() *QueueImpl { - return nil + return &QueueImpl{} } // Push the task -func (q *QueueImpl) Push() { - +func (q *QueueImpl) Push(item interface{}) { + fmt.Println(item) } func (q *QueueImpl) Pop() interface{} { |