Documentation ¶
Index ¶
- type IncrementingNonceGenerator
- type TestAsync
- func (t *TestAsync) Close()
- func (t *TestAsync) Connect() error
- func (t *TestAsync) Done() <-chan error
- func (t *TestAsync) DumpSentMessages()
- func (t *TestAsync) Listen() <-chan []byte
- func (t *TestAsync) Publish(raw string)
- func (t *TestAsync) Send(ctx context.Context, msg interface{}) error
- func (t *TestAsync) SentCount() int
- type TestAsyncFactory
- type TestWsService
- func (s *TestWsService) Broadcast(msg string)
- func (s *TestWsService) PublishOnConnect(msg string)
- func (s *TestWsService) Received(clientNum int, msgNum int) (string, error)
- func (s *TestWsService) ReceivedCount(clientNum int) int
- func (s *TestWsService) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *TestWsService) Start() error
- func (s *TestWsService) Stop()
- func (s *TestWsService) TotalClientCount() int
- func (s *TestWsService) WaitForClientCount(count int) error
- func (s *TestWsService) WaitForMessage(clientNum int, msgNum int) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IncrementingNonceGenerator ¶
type IncrementingNonceGenerator struct {
// contains filtered or unexported fields
}
IncrementingNonceGenerator starts at nonce1 and increments each by +1: nonce1, nonce2, ..., nonceN
func (*IncrementingNonceGenerator) GetNonce ¶
func (m *IncrementingNonceGenerator) GetNonce() string
GetNonce returns an incrementing nonce value.
type TestAsync ¶
type TestAsync struct { Sent []interface{} // contains filtered or unexported fields }
func (*TestAsync) DumpSentMessages ¶
func (t *TestAsync) DumpSentMessages()
type TestAsyncFactory ¶
type TestAsyncFactory struct { Count int Async websocket.Asynchronous }
does not work for reconnect tests
func (*TestAsyncFactory) Create ¶
func (t *TestAsyncFactory) Create() websocket.Asynchronous
type TestWsService ¶
type TestWsService struct {
// contains filtered or unexported fields
}
func NewTestWsService ¶
func NewTestWsService(port int) *TestWsService
func (*TestWsService) Broadcast ¶
func (s *TestWsService) Broadcast(msg string)
Broadcast sends a message to all connected clients.
func (*TestWsService) PublishOnConnect ¶
func (s *TestWsService) PublishOnConnect(msg string)
func (*TestWsService) Received ¶
func (s *TestWsService) Received(clientNum int, msgNum int) (string, error)
Received starts indexing clients and message positions at position 0.
func (*TestWsService) ReceivedCount ¶
func (s *TestWsService) ReceivedCount(clientNum int) int
ReceivedCount starts indexing clients at position 0.
func (*TestWsService) ServeHTTP ¶
func (s *TestWsService) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*TestWsService) Stop ¶
func (s *TestWsService) Stop()
func (*TestWsService) TotalClientCount ¶
func (s *TestWsService) TotalClientCount() int
func (*TestWsService) WaitForClientCount ¶
func (s *TestWsService) WaitForClientCount(count int) error
func (*TestWsService) WaitForMessage ¶
func (s *TestWsService) WaitForMessage(clientNum int, msgNum int) (string, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.