Documentation ¶
Index ¶
- func Client(ctx context.Context, slot, address, remoteAddress string, opt ...Option) (*net.UDPAddr, *net.UDPAddr, error)
- func Server(ctx context.Context, address string, options ...Option) error
- type Config
- type Connection
- type ConnectionCloser
- type ConnectionMiddleware
- type ConnectionReader
- type ConnectionWriter
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection interface { ConnectionReader ConnectionWriter ConnectionCloser }
type ConnectionCloser ¶
type ConnectionCloser interface {
Close() error
}
type ConnectionMiddleware ¶
type ConnectionMiddleware func(Connection) Connection
func LoggingMiddleware ¶
func LoggingMiddleware(log logInterface) ConnectionMiddleware
func SigningMiddleware ¶
func SigningMiddleware(secret []byte) ConnectionMiddleware
type ConnectionReader ¶
type ConnectionWriter ¶
type Option ¶
type Option func(cfg *Config)
func ConnOption ¶
func ConnOption(mw ...ConnectionMiddleware) Option
Source Files ¶
Click to show internal directories.
Click to hide internal directories.