udp_vconn

package
v0.16.34 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnExpirationPolicy

type ConnExpirationPolicy interface {
	IsExpired(now, lastUsed time.Time) bool
	PollFrequency() time.Duration
}

func NewDefaultExpirationPolicy

func NewDefaultExpirationPolicy() ConnExpirationPolicy

type Event

type Event interface {
	Handle(Manager) error
}

type Manager

type Manager interface {
	GetWriteQueue(clientAddr net.Addr) WriteQueue
	CreateWriteQueue(clientAddr net.Addr, service string, conn UDPWriterTo) (WriteQueue, error)
	QueueEvent(Event)
	QueueError(error)
}

func NewManager

func NewManager(context ziti.Context, newConnPolicy NewConnPolicy, expirationPolicy ConnExpirationPolicy) Manager

type NewConnAcceptResult

type NewConnAcceptResult int
const (
	Allow NewConnAcceptResult = iota
	Deny
	AllowDropLRU
)

type NewConnPolicy

type NewConnPolicy interface {
	NewConnection(currentCount uint32) NewConnAcceptResult
}

func NewLimitedConnectionPolicyDropLRU

func NewLimitedConnectionPolicyDropLRU(limit uint32) NewConnPolicy

func NewLimitedConnectionPolicyDropNew

func NewLimitedConnectionPolicyDropNew(limit uint32) NewConnPolicy

func NewUnlimitedConnectionPolicy

func NewUnlimitedConnectionPolicy() NewConnPolicy

type UDPWriterTo

type UDPWriterTo interface {
	WriteTo(b []byte, addr net.Addr) (int, error)
	LocalAddr() net.Addr
}

type UnpooledBuffer

type UnpooledBuffer []byte

func (UnpooledBuffer) GetPayload

func (u UnpooledBuffer) GetPayload() []byte

func (UnpooledBuffer) Release

func (u UnpooledBuffer) Release()

type WriteQueue

type WriteQueue interface {
	Accept(mempool.PooledBuffer)
	LocalAddr() net.Addr
	Service() string
}

Jump to

Keyboard shortcuts

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