Documentation
¶
Index ¶
- Constants
- type ConnectionClosedEvent
- type ConnectionManager
- func (c *ConnectionManager) AddConnection(conn *ouroboros.Connection)
- func (c *ConnectionManager) CreateOutboundConn(address string) (*ouroboros.Connection, error)
- func (c *ConnectionManager) GetConnectionById(connId ouroboros.ConnectionId) *ouroboros.Connection
- func (c *ConnectionManager) RemoveConnection(connId ouroboros.ConnectionId)
- func (c *ConnectionManager) Start() error
- type ConnectionManagerConfig
- type ConnectionManagerConnClosedFunc
- type InboundConnectionEvent
- type ListenerConfig
- type UnixConn
- type UnixConnAddr
Constants ¶
View Source
const ( InboundConnectionEventType = "connmanager.inbound-conn" ConnectionClosedEventType = "connmanager.conn-closed" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionClosedEvent ¶ added in v0.2.0
type ConnectionClosedEvent struct { ConnectionId ouroboros.ConnectionId Error error }
type ConnectionManager ¶
type ConnectionManager struct {
// contains filtered or unexported fields
}
func NewConnectionManager ¶
func NewConnectionManager(cfg ConnectionManagerConfig) *ConnectionManager
func (*ConnectionManager) AddConnection ¶
func (c *ConnectionManager) AddConnection(conn *ouroboros.Connection)
func (*ConnectionManager) CreateOutboundConn ¶ added in v0.2.0
func (c *ConnectionManager) CreateOutboundConn( address string, ) (*ouroboros.Connection, error)
func (*ConnectionManager) GetConnectionById ¶
func (c *ConnectionManager) GetConnectionById( connId ouroboros.ConnectionId, ) *ouroboros.Connection
func (*ConnectionManager) RemoveConnection ¶
func (c *ConnectionManager) RemoveConnection(connId ouroboros.ConnectionId)
func (*ConnectionManager) Start ¶ added in v0.1.7
func (c *ConnectionManager) Start() error
type ConnectionManagerConfig ¶
type ConnectionManagerConfig struct { Logger *slog.Logger EventBus *event.EventBus ConnClosedFunc ConnectionManagerConnClosedFunc Listeners []ListenerConfig OutboundConnOpts []ouroboros.ConnectionOptionFunc OutboundSourcePort uint }
type ConnectionManagerConnClosedFunc ¶
type ConnectionManagerConnClosedFunc func(ouroboros.ConnectionId, error)
ConnectionManagerConnClosedFunc is a function that takes a connection ID and an optional error
type InboundConnectionEvent ¶ added in v0.1.7
type ListenerConfig ¶ added in v0.1.7
type UnixConn ¶ added in v0.4.0
UnixConn is a wrapper around net.UnixConn that provides a unique remote address
func (UnixConn) RemoteAddr ¶ added in v0.4.0
type UnixConnAddr ¶ added in v0.4.0
type UnixConnAddr struct {
// contains filtered or unexported fields
}
func (UnixConnAddr) Network ¶ added in v0.4.0
func (UnixConnAddr) Network() string
func (UnixConnAddr) String ¶ added in v0.4.0
func (u UnixConnAddr) String() string
Click to show internal directories.
Click to hide internal directories.