Documentation ¶
Index ¶
Constants ¶
const (
// SemVer is the version of ircstress this is.
SemVer = "0.0.1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { sync.Mutex Nick string Socket *Socket // contains filtered or unexported fields }
Client is a client connection
func (*Client) CloseExpected ¶
func (*Client) Disconnect ¶
Disconnect disconnects from the given server
func (*Client) SetCloseExpected ¶
type Event ¶
type Event struct { Type EventType Line string Wait *WaitMessage }
Event is an IRC event.
type EventQueue ¶
EventQueue represents a series of events.
func (EventQueue) Run ¶
func (queue EventQueue) Run(server *Server)
Run goes through our event list.
type EventType ¶
type EventType int
EventType is the type of event it is.
const ( // ETConnect represents the client connecting to the server. ETConnect EventType = iota // ETDisconnect represents the client disconnecting from the server. ETDisconnect // ETLine represents the client sending an IRC line to the server. ETLine // ETWait represents the client waiting for a specific response from the server. ETWait // ETPing causes the client to send a ping, then wait for the specific response ETPing )
type NickSelector ¶
type NickSelector struct { RandomNickOrder bool // contains filtered or unexported fields }
NickSelector takes given nicknames and provides you with nicknames to use.
func NewNickSelector ¶
func NewNickSelector() *NickSelector
NewNickSelector returns an empty NickSelector with no nicks.
func NickSelectorFromList ¶
func NickSelectorFromList(nickList string) *NickSelector
NickSelectorFromList takes a list of nicks and returns a NickSelector.
func (*NickSelector) GetNick ¶
func (ns *NickSelector) GetNick() string
GetNick returns a nickname from the selector.
type Server ¶
type Server struct { ClientsReadyToDisconnect sync.WaitGroup ClientsFinished sync.WaitGroup Name string Conn ServerConnectionDetails // contains filtered or unexported fields }
Server represents a server we are stress-testing.
func (*Server) RecordSuccess ¶
func (server *Server) RecordSuccess()
type ServerConnectionDetails ¶
ServerConnectionDetails holds the details used to connect to the server.
type Socket ¶
type Socket struct { Closed bool // contains filtered or unexported fields }
Socket represents an IRC socket.
func (*Socket) Close ¶
func (socket *Socket) Close()
Close stops a Socket from being able to send/receive any more data.
type WaitMessage ¶
type WaitMessage struct { // Command is the IRC command to wait for. Command *string // Params are the IRC message params to wait for. Params *string }
WaitMessage is a message that the client should wait for.