cache

package
v0.0.0-...-e9f4c3e Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnexistFlowID  uint64 = 0
	UnexistGroupID uint32 = 0
)

Variables

This section is empty.

Functions

func GenDnatMapKey

func GenDnatMapKey(ip, protocol string, port int32) string

Types

type CreateGroupFunc

type CreateGroupFunc func() (*ofctrl.Group, error)

type DeleteGroupFunc

type DeleteGroupFunc func(gpID uint32)

type SvcFlowEntry

type SvcFlowEntry struct {
	LBIP     string
	PortName string
	FlowID   uint64
}

type SvcGroupEntry

type SvcGroupEntry struct {
	PortName      string
	TrafficPolicy ertype.TrafficPolicyType
	GroupID       uint32
}

type SvcIndex

type SvcIndex struct {
	// contains filtered or unexported fields
}

func NewSvcIndex

func NewSvcIndex() *SvcIndex

func (*SvcIndex) DeleteDnatFlow

func (s *SvcIndex) DeleteDnatFlow(backend string)

func (*SvcIndex) GetDnatFlow

func (s *SvcIndex) GetDnatFlow(backend string) uint64

func (*SvcIndex) GetSvcOvsInfo

func (s *SvcIndex) GetSvcOvsInfo(svcID string) *SvcOvsInfo

func (*SvcIndex) GetSvcOvsInfoAndInitIfEmpty

func (s *SvcIndex) GetSvcOvsInfoAndInitIfEmpty(svcID string) *SvcOvsInfo

func (*SvcIndex) IsSvcInfoNil

func (s *SvcIndex) IsSvcInfoNil(svcID string) bool

used by unittest

func (*SvcIndex) SetDnatFlow

func (s *SvcIndex) SetDnatFlow(backend string, flowID uint64)

func (*SvcIndex) TryCleanSvcOvsInfoCache

func (s *SvcIndex) TryCleanSvcOvsInfoCache(svcID string)

type SvcOvsInfo

type SvcOvsInfo struct {
	// contains filtered or unexported fields
}

func NewSvcOvsInfo

func NewSvcOvsInfo(svcID string) *SvcOvsInfo

func (*SvcOvsInfo) DeleteGroupIfExist

func (s *SvcOvsInfo) DeleteGroupIfExist(portName string, groupType ertype.TrafficPolicyType, f DeleteGroupFunc)

func (*SvcOvsInfo) DeleteLBFlowsByPortName

func (s *SvcOvsInfo) DeleteLBFlowsByPortName(portName string)

func (*SvcOvsInfo) GetAllGroups

func (s *SvcOvsInfo) GetAllGroups() []SvcGroupEntry

func (*SvcOvsInfo) GetAllLBFlows

func (s *SvcOvsInfo) GetAllLBFlows() []SvcFlowEntry

func (*SvcOvsInfo) GetAllSessionAffinityFlows

func (s *SvcOvsInfo) GetAllSessionAffinityFlows() []SvcFlowEntry

func (*SvcOvsInfo) GetGroup

func (s *SvcOvsInfo) GetGroup(portName string, groupType ertype.TrafficPolicyType) uint32

func (*SvcOvsInfo) GetGroupAndCreateIfEmpty

func (s *SvcOvsInfo) GetGroupAndCreateIfEmpty(portName string, groupType ertype.TrafficPolicyType, f CreateGroupFunc) (uint32, error)

func (*SvcOvsInfo) GetLBFlow

func (s *SvcOvsInfo) GetLBFlow(lbIP, portName string) uint64

func (*SvcOvsInfo) GetSessionAffinityFlow

func (s *SvcOvsInfo) GetSessionAffinityFlow(lbIP, portName string) uint64

func (*SvcOvsInfo) IsEmpty

func (s *SvcOvsInfo) IsEmpty() bool

func (*SvcOvsInfo) SetLBFlow

func (s *SvcOvsInfo) SetLBFlow(lbIP, portName string, flowID uint64)

func (*SvcOvsInfo) SetSessionAffinityFlow

func (s *SvcOvsInfo) SetSessionAffinityFlow(lbIP, portName string, flowID uint64)

Jump to

Keyboard shortcuts

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