testutil

package
v0.3.25 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFreePort

func GetFreePort() (int, error)

GetFreePort returns a loopback port that is free for both TCP and UDP. Memberlist binds its TCP and UDP listeners on the same port number, so a port checked for TCP alone can still fail with "address already in use" when another socket holds the UDP side.

func NewConfig

func NewConfig() *config.Config

func NewConfigWithTLS added in v0.2.0

func NewConfigWithTLS(t *testing.T, serverTLS, clientTLS *tls.Config) *config.Config

func NewEngineConfig

func NewEngineConfig(t *testing.T) *config.Engine

func NewFlogger

func NewFlogger(c *config.Config) *flog.Logger

func NewServer

func NewServer(c *config.Config) *server.Server

func ToKey

func ToKey(i int) string

func ToVal

func ToVal(i int) []byte

func TryWithInterval

func TryWithInterval(max int, interval time.Duration, f func() error) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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