Documentation ¶
Overview ¶
iface contains interfaces that different components within egress use to communicate.
Index ¶
- Constants
- Variables
- func Init()
- type PathPool
- type RemoteInfo
- type SessPath
- type SessPathPool
- func (spp SessPathPool) ExpireFails()
- func (spp SessPathPool) Get(exclude spathmeta.PathKey) *SessPath
- func (spp SessPathPool) GetByKey(key spathmeta.PathKey) *SessPath
- func (spp SessPathPool) PathCount() int
- func (spp SessPathPool) Reply(path *SessPath, sent time.Time)
- func (spp SessPathPool) Timeout(path *SessPath, sent time.Time)
- func (spp SessPathPool) Update(aps spathmeta.AppPathSet)
- type SessPathStats
- type Session
- type SessionSelector
Constants ¶
View Source
const ( // FIXME(kormat): these relative sizes will fail if there are lots of egress dispatchers. EgressFreePktsCap = 2048 EgressRemotePkts = 512 EgressBufPkts = 32 SafetyInterval = 60 * time.Second )
Variables ¶
View Source
var EgressFreePkts *ringbuf.Ring
Functions ¶
Types ¶
type PathPool ¶
type PathPool interface { // Paths returns the paths contained in the pool. Paths() spathmeta.AppPathSet // Destroy cleans up any resources associated with the PathPool. Destroy() error }
PathPool is implemented by objects that maintain sets of paths. PathPools must be safe for concurrent use by multiple goroutines.
type RemoteInfo ¶
func (*RemoteInfo) Copy ¶
func (r *RemoteInfo) Copy() *RemoteInfo
Copy created a deep copy of the object.
func (*RemoteInfo) String ¶
func (r *RemoteInfo) String() string
type SessPath ¶
type SessPath struct {
// contains filtered or unexported fields
}
A SessPath contains a path and metadata related to path health.
func NewSessPath ¶
func NewSessPath(key spathmeta.PathKey, pathEntry *sciond.PathReplyEntry) *SessPath
func (*SessPath) IsCloseToExpiry ¶
func (*SessPath) PathEntry ¶
func (sp *SessPath) PathEntry() *sciond.PathReplyEntry
type SessPathPool ¶
type SessPathPool map[spathmeta.PathKey]*SessPathStats
func NewSessPathPool ¶
func NewSessPathPool() *SessPathPool
func (SessPathPool) ExpireFails ¶
func (spp SessPathPool) ExpireFails()
func (SessPathPool) Get ¶
func (spp SessPathPool) Get(exclude spathmeta.PathKey) *SessPath
Get returns the most suitable path. Excludes a specific path, if possible.
func (SessPathPool) PathCount ¶
func (spp SessPathPool) PathCount() int
func (SessPathPool) Reply ¶
func (spp SessPathPool) Reply(path *SessPath, sent time.Time)
Reply is called when a probe reply arrives. 'sent' is the time when the original probe was sent.
func (SessPathPool) Timeout ¶
func (spp SessPathPool) Timeout(path *SessPath, sent time.Time)
Timeout is called when a reply to a probe is not received in time. 'sent' is the time when the original probe was sent.
func (SessPathPool) Update ¶
func (spp SessPathPool) Update(aps spathmeta.AppPathSet)
type SessPathStats ¶
type SessPathStats struct { SessPath *SessPath // contains filtered or unexported fields }
func NewSessPathStats ¶
func NewSessPathStats(key spathmeta.PathKey, pathEntry *sciond.PathReplyEntry) *SessPathStats
type Session ¶
type Session interface { // Logger defines common logging primitives log.Logger // IA returns the session's remote IA IA() addr.IA // ID returns the session's ID. ID() mgmt.SessionType // Conn returns the session's outbound snet Conn. // The returned value must be the same for the entire lifetime of the object. Conn() snet.Conn // Ring returns the session's ring buffer. Ring() *ringbuf.Ring // Remote returns the session's currently chosen SIG and path. Remote() *RemoteInfo // Cleanup shuts down the session and cleans resources. Cleanup() error // Healthy returns true if the session has a remote SIG and is receiving // keepalive responses from it. Healthy() bool // PathPool returns the session's available pool of paths. PathPool() PathPool // AnnounceWorkerStopped is used to inform the session that its worker needed to shut down. AnnounceWorkerStopped() }
Session defines a stateful context for sending traffic to a remote AS.
type SessionSelector ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_iface is a generated GoMock package.
|
Package mock_iface is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.