Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FIXME(kormat): these relative sizes will fail if there are lots of egress dispatchers. EgressFreePktsCap = 1024 EgressBufPkts = 32 )
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) String ¶
func (r *RemoteInfo) String() string
type Runner ¶
type Runner interface {
Run()
}
Runner is implemented by objects that operate as goroutines.
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) ExpireFails ¶
func (sp *SessPath) ExpireFails()
func (*SessPath) PathEntry ¶
func (sp *SessPath) PathEntry() *sciond.PathReplyEntry
type SessPathPool ¶
func (SessPathPool) Get ¶
func (spp SessPathPool) Get(currKey spathmeta.PathKey) *SessPath
Return the path with the fewest failures, excluding the current path (if specified).
func (SessPathPool) Update ¶
func (spp SessPathPool) Update(aps spathmeta.AppPathSet)
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 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 ¶
type SessionSet ¶
type SessionSet map[mgmt.SessionType]Session
Directories ¶
Path | Synopsis |
---|---|
Package dispatcher reads from input ring buffer, decides on a Session and puts data on the ring buffer of the Session.
|
Package dispatcher reads from input ring buffer, decides on a Session and puts data on the ring buffer of the Session. |
Package reader implements a reader object that reads from tun, routes with support from egress/router to determine the correct egressDispatcher, and puts data on the ring buffer of the egressDispatcher.
|
Package reader implements a reader object that reads from tun, routes with support from egress/router to determine the correct egressDispatcher, and puts data on the ring buffer of the egressDispatcher. |
Package router implements an IPv4/IPv6 router.
|
Package router implements an IPv4/IPv6 router. |
Package session monitors session health and maintains a concurrency-safe remote SIG address (that includes a working path) for each session.
|
Package session monitors session health and maintains a concurrency-safe remote SIG address (that includes a working path) for each session. |
Package worker implements the logic for reading packets from a session's ring buffer, encapsulating them and writing them to the network as frames.
|
Package worker implements the logic for reading packets from a session's ring buffer, encapsulating them and writing them to the network as frames. |
Click to show internal directories.
Click to hide internal directories.