mock

package
v0.0.0-...-3921fd5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRCServer

type IRCServer struct {

	// Accounts maps username to password for SASL auth.
	Accounts map[string]string
	// contains filtered or unexported fields
}

IRCServer is a minimal mock IRC server for unit testing. It supports TLS, SASL PLAIN authentication, and basic IRC commands. PRIVMSG messages are broadcast to all clients in the same channel.

func NewIRCServer

func NewIRCServer() (*IRCServer, error)

NewIRCServer creates and starts a mock IRC server with a self-signed TLS cert.

func (*IRCServer) Addr

func (s *IRCServer) Addr() string

Addr returns the server's listen address (host:port).

func (*IRCServer) Close

func (s *IRCServer) Close()

Close shuts down the mock server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL