v1.15.1 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 3 Imported by: 0



Copyright 2021 Antrea Authors

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.



This section is empty.


This section is empty.


This section is empty.


type ExpirePriorityQueue

type ExpirePriorityQueue struct {
	ActiveFlowTimeout time.Duration
	IdleFlowTimeout   time.Duration
	KeyToItem         map[flowexporter.ConnectionKey]*flowexporter.ItemToExpire
	// contains filtered or unexported fields

func NewExpirePriorityQueue

func NewExpirePriorityQueue(activeFlowTimeout time.Duration, idleFlowTimeout time.Duration) *ExpirePriorityQueue

func (*ExpirePriorityQueue) GetExpiryFromExpirePriorityQueue

func (pq *ExpirePriorityQueue) GetExpiryFromExpirePriorityQueue() time.Duration

GetExpiryFromExpirePriorityQueue returns the shortest expire time duration from expire priority queue.

func (*ExpirePriorityQueue) GetTopExpiredItem

func (pq *ExpirePriorityQueue) GetTopExpiredItem(currTime time.Time) *flowexporter.ItemToExpire

func (*ExpirePriorityQueue) Len

func (pq *ExpirePriorityQueue) Len() int

func (*ExpirePriorityQueue) Less

func (pq *ExpirePriorityQueue) Less(i, j int) bool

func (*ExpirePriorityQueue) Peek

Peek returns the item at the beginning of the queue, without removing the item or otherwise mutating the queue. It is safe to call directly.

func (*ExpirePriorityQueue) Pop

func (pq *ExpirePriorityQueue) Pop() interface{}

func (*ExpirePriorityQueue) Push

func (pq *ExpirePriorityQueue) Push(x interface{})

func (*ExpirePriorityQueue) Remove added in v1.7.1

Remove removes and returns an Item by key from priority queue if it exists.

func (*ExpirePriorityQueue) RemoveItemFromMap

func (pq *ExpirePriorityQueue) RemoveItemFromMap(conn *flowexporter.Connection)

func (*ExpirePriorityQueue) ResetActiveExpireTimeAndPush

func (pq *ExpirePriorityQueue) ResetActiveExpireTimeAndPush(pqItem *flowexporter.ItemToExpire, currTime time.Time)

func (*ExpirePriorityQueue) Swap

func (pq *ExpirePriorityQueue) Swap(i, j int)

func (*ExpirePriorityQueue) Update

func (pq *ExpirePriorityQueue) Update(item *flowexporter.ItemToExpire, activeExpireTime time.Time, idleExpireTime time.Time)

Update modifies the priority of an Item in the queue.

func (*ExpirePriorityQueue) WriteItemToQueue added in v1.7.1

func (pq *ExpirePriorityQueue) WriteItemToQueue(connKey flowexporter.ConnectionKey, conn *flowexporter.Connection)

WriteItemToQueue adds conn with connKey into the queue. If an existing item has the same connKey, it will be overwritten by the new item.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL