diamtest

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package diamtest provides utilities for Diameter testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Network  string
	Addr     string
	Listener net.Listener
	TLS      *tls.Config
	Config   *diam.Server
}

A Server is a Diameter server listening on a system-chosen port on the local loopback interface, for use in end-to-end tests.

func NewServer

func NewServer(handler diam.Handler, dp *dict.Parser) *Server

NewServer starts and returns a new Server. The caller should call Close when finished, to shut it down.

func NewServerNetwork

func NewServerNetwork(network string, handler diam.Handler, dp *dict.Parser) *Server

NewServerNetwork starts and returns a new Server listening on specified network. The caller should call Close when finished, to shut it down.

func NewUnstartedServer

func NewUnstartedServer(handler diam.Handler, dp *dict.Parser) *Server

NewUnstartedServer returns a new Server but doesn't start it.

After changing its configuration, the caller should call Start or StartTLS.

The caller should call Close when finished, to shut it down.

func NewUnstartedServerNetwork

func NewUnstartedServerNetwork(network string, handler diam.Handler, dp *dict.Parser) *Server

NewUnstartedServerNetwork returns a new Server on the network but doesn't start it.

After changing its configuration, the caller should call Start or StartTLS.

The caller should call Close when finished, to shut it down.

func (*Server) Close

func (s *Server) Close()

Close shuts down the server.

func (*Server) Start

func (s *Server) Start()

Start starts a server from NewUnstartedServer.

func (*Server) StartTLS

func (s *Server) StartTLS()

StartTLS starts TLS on a server from NewUnstartedServer.

Jump to

Keyboard shortcuts

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