Documentation ¶
Index ¶
- Constants
- func CircuitSetter(v interface{}, f reflect.Value) error
- func ProxyListenerFactorySetter(v interface{}, opt *cf.Options) (interface{}, error)
- func ProxyTerminatorFactorySetter(v interface{}, opt *cf.Options) (interface{}, error)
- func TransportAddressSetter(v interface{}, f reflect.Value) error
- func WestworldProfileFlexibleSetter(v interface{}, opt *cf.Options) (interface{}, error)
- type Address
- type Circuit
- type Config
- type ContentType
- type Control
- type ControlFlag
- type Datamesh
- type Destination
- type Dialer
- type DialerConfig
- type Endpoint
- type EndpointTxer
- type Forwarder
- func (fw *Forwarder) AddDestination(d Destination)
- func (fw *Forwarder) AddRoute(circuitId Circuit, srcAddr, destAddr Address)
- func (fw *Forwarder) Forward(srcAddr Address, payload *Payload) error
- func (fw *Forwarder) RemoveDestination(d Destination)
- func (fw *Forwarder) RemoveRoute(circuitId Circuit, srcAddr Address)
- type Handlers
- type HeaderKey
- type Link
- type LinkConfig
- type LinkDirection
- type LinkDownHandler
- type LinkUpHandler
- type Listener
- type ListenerConfig
- type NIC
- type NICAdapter
- type Overlay
- type Payload
- type PayloadFlag
- type ProxyFactory
- type ProxyListener
- type ProxyListenerFactory
- type ProxyTerminator
- type ProxyTerminatorFactory
Constants ¶
View Source
const ( MinHeaderKey = 2000 CircuitIdHeaderKey = 2001 ControlFlagsHeaderKey = 2256 PingIdHeaderKey = 2257 PingTimestampHeaderKey = 2258 MaxHeaderKey = 2999 )
Variables ¶
This section is empty.
Functions ¶
func CircuitSetter ¶
func TransportAddressSetter ¶
Types ¶
type Config ¶
type Config struct { Listeners []*ListenerConfig Dialers []*DialerConfig Profile interface{} }
type ContentType ¶
type ContentType uint32
const ( ControlContentType ContentType = 10099 DataContentType ContentType = 10100 )
type ControlFlag ¶
type ControlFlag uint32
const ( PingRequestControlFlag ControlFlag = 1 PingResponseControlFlag ControlFlag = 2 )
type Datamesh ¶
type Datamesh struct { Fwd *Forwarder Handlers *Handlers // contains filtered or unexported fields }
func NewDatamesh ¶
type Destination ¶
type DialerConfig ¶
type DialerConfig struct { Id string BindAddress transport.Address LinkConfig *LinkConfig }
func DialerConfigDefaults ¶
func DialerConfigDefaults() *DialerConfig
type Endpoint ¶
type Endpoint interface { Connect(txer EndpointTxer) error dilithium.Sink }
Endpoint defines the primary "extensible" component in datamesh. An Endpoint sits inside of a NIC, which allows it to communicate with another NIC, and its contained Endpoint elsewhere on the network.
type EndpointTxer ¶
EndpointTxer defines the transmitter interface exposed to an Endpoint.
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
func (*Forwarder) AddDestination ¶
func (fw *Forwarder) AddDestination(d Destination)
func (*Forwarder) RemoveDestination ¶
func (fw *Forwarder) RemoveDestination(d Destination)
func (*Forwarder) RemoveRoute ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
func (*Handlers) AddLinkDownHandler ¶
func (handlers *Handlers) AddLinkDownHandler(h LinkDownHandler)
func (*Handlers) AddLinkUpHandler ¶
func (handlers *Handlers) AddLinkUpHandler(h LinkUpHandler)
type Link ¶
type Link interface { Destination Start() error Peer() *identity.TokenId Direction() LinkDirection SendControl(c *Control) error }
type LinkConfig ¶
func LinkConfigDefaults ¶
func LinkConfigDefaults() *LinkConfig
type LinkDirection ¶
type LinkDirection int8
const ( InboundLink LinkDirection = 0 OutboundLink LinkDirection = 1 )
type LinkDownHandler ¶
type LinkDownHandler func(Link)
LinkDownHandler is invoked whenever a link goes down
type LinkUpHandler ¶
type LinkUpHandler func(Link)
LinkUpHandler is invoked whenever a new link is brought up
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func NewListener ¶
func NewListener(cfg *ListenerConfig, id *identity.TokenId) *Listener
type ListenerConfig ¶
type ListenerConfig struct { Id string BindAddress transport.Address Advertisement transport.Address LinkConfig *LinkConfig }
func ListenerConfigDefaults ¶
func ListenerConfigDefaults() *ListenerConfig
type NIC ¶
type NIC interface { Destination }
type NICAdapter ¶
type NICAdapter struct {
// contains filtered or unexported fields
}
func NewNICAdapter ¶
func NewNICAdapter(nic NIC) *NICAdapter
func (*NICAdapter) Close ¶
func (na *NICAdapter) Close() error
type PayloadFlag ¶
type PayloadFlag uint32
type ProxyFactory ¶
type ProxyListener ¶
type ProxyListener struct {
// contains filtered or unexported fields
}
func NewProxyListener ¶
func NewProxyListener(bindAddress transport.Address) *ProxyListener
func (*ProxyListener) Accept ¶
func (pxl *ProxyListener) Accept(data []byte) error
func (*ProxyListener) Close ¶
func (pxl *ProxyListener) Close()
func (*ProxyListener) Connect ¶
func (pxl *ProxyListener) Connect(txq EndpointTxer) error
type ProxyListenerFactory ¶
func (*ProxyListenerFactory) Circuit ¶
func (pxlf *ProxyListenerFactory) Circuit() Circuit
func (*ProxyListenerFactory) Create ¶
func (pxlf *ProxyListenerFactory) Create() (Endpoint, error)
type ProxyTerminator ¶
type ProxyTerminator struct {
// contains filtered or unexported fields
}
func NewProxyTerminator ¶
func NewProxyTerminator(dialAddress transport.Address) *ProxyTerminator
func (*ProxyTerminator) Accept ¶
func (pxt *ProxyTerminator) Accept(data []byte) error
func (*ProxyTerminator) Close ¶
func (pxt *ProxyTerminator) Close()
func (*ProxyTerminator) Connect ¶
func (pxt *ProxyTerminator) Connect(txq EndpointTxer) error
type ProxyTerminatorFactory ¶
func (*ProxyTerminatorFactory) Circuit ¶
func (pxtf *ProxyTerminatorFactory) Circuit() Circuit
func (*ProxyTerminatorFactory) Create ¶
func (pxtf *ProxyTerminatorFactory) Create() (Endpoint, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.