servicetest

package
v8.24.7 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	Listener net.Listener
	Handler  func(net.Conn)
}

Service represents a test service.

func NewService

func NewService() *Service

NewService returns a new instance of the service that runs on a node, which responds to internode (Raft) communication. It is used to simulate a remote node in a cluster.

func (*Service) Addr

func (s *Service) Addr() string

Addr returns the address of the service.

func (*Service) Close

func (s *Service) Close() error

Close closes the service.

func (*Service) Start

func (s *Service) Start()

Start starts the service.

Jump to

Keyboard shortcuts

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