Documentation ¶
Overview ¶
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
http://www.apache.org/licenses/LICENSE-2.0
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.
Index ¶
- type ExpirePriorityQueue
- func (pq *ExpirePriorityQueue) AddItemToQueue(connKey flowexporter.ConnectionKey, conn *flowexporter.Connection)
- func (pq *ExpirePriorityQueue) GetExpiryFromExpirePriorityQueue() time.Duration
- func (pq *ExpirePriorityQueue) GetTopExpiredItem(currTime time.Time) *flowexporter.ItemToExpire
- func (pq *ExpirePriorityQueue) Len() int
- func (pq *ExpirePriorityQueue) Less(i, j int) bool
- func (pq *ExpirePriorityQueue) Peek() *flowexporter.ItemToExpire
- func (pq *ExpirePriorityQueue) Pop() interface{}
- func (pq *ExpirePriorityQueue) Push(x interface{})
- func (pq *ExpirePriorityQueue) RemoveItemFromMap(conn *flowexporter.Connection)
- func (pq *ExpirePriorityQueue) ResetActiveExpireTimeAndPush(pqItem *flowexporter.ItemToExpire, currTime time.Time)
- func (pq *ExpirePriorityQueue) Swap(i, j int)
- func (pq *ExpirePriorityQueue) Update(item *flowexporter.ItemToExpire, activeExpireTime time.Time, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) AddItemToQueue ¶
func (pq *ExpirePriorityQueue) AddItemToQueue(connKey flowexporter.ConnectionKey, conn *flowexporter.Connection)
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 ¶
func (pq *ExpirePriorityQueue) Peek() *flowexporter.ItemToExpire
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) 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.