Documentation
¶
Overview ¶
Package proxy implements the IRC Idler proxy daemon proper.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptLoop ¶
AcceptLoop accepts connections from `l`, and sends them on `acceptChan`.
Types ¶
type Connector ¶
type Connector interface {
Connect() (irc.ReadWriteCloser, error)
}
A Connector establishes an IRC connection.
type DialerConnector ¶
A DialerConnector is a Connector that uses a Dialer to establish connections to a specific destination.
func (*DialerConnector) Connect ¶
func (dc *DialerConnector) Connect() (irc.ReadWriteCloser, error)
Connect establishes a connection by invoking dc.Dialer.Dial(dc.Network, dc.Addr)
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
A Proxy is a daemon implementing the core IRC Idler proxying functionality.
func NewProxy ¶
func NewProxy( logger *log.Logger, store storage.Store, clientConns <-chan irc.ReadWriteCloser, serverConnector Connector) *Proxy
NewProxy creates a new proxy.
parameters:
`logger`, if non-nil, will be used for informational logging. `store` is the Store to use for persistent data. `clientConns` is a channel on which incoming client connections are sent. `serverConnector` is a `Connector` to be used to connect to the server.