Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct {
ID string // Article ID
Groups []string // Groups which holds the article
// Result
Exists bool // Flag which defines if article exists on NNTP server
Content []byte // Content of fetched article, filled on operation fetch, otherwise NIL
}
Article describes the article information
type Conn ¶
type Conn interface {
Connect() (bool, error)
Close() error
SwitchGroup(group string) error
ArticleExists(id string) (bool, error)
FetchArticle(id string) ([]byte, error)
}
Conn represent(s) a single connection to a NNTP Server
func NewConn ¶
func NewConn(id int, i *ServerInfo) Conn
NewConn create a new NNTP connection based on provided ServerInfo
type ConnectionPool ¶
type ConnectionPool struct {
Info *ServerInfo
// contains filtered or unexported fields
}
ConnectionPool to NNTP server
func NewConnectionPool ¶
func NewConnectionPool(i *ServerInfo, reqQueue chan *Request, maxConnections int) *ConnectionPool
NewConnectionPool create new connection pool to NNTP Server
func (*ConnectionPool) Collect ¶
func (cp *ConnectionPool) Collect() chan *Response
Collect *Response(s) from ConnectionPool