mockserverservice

package
v0.0.0-...-33704e8 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrivateIP

func GetPrivateIP() string

Function to get the private IP address of the server

Types

type MockServersService

type MockServersService interface {
	Start(cfg *models.StartMockServerRequestBody) error
	Stop(cfg *models.StopMockServerRequestBody) error
}

type MockServersServiceImp

type MockServersServiceImp struct {
	// contains filtered or unexported fields
}

MockServerService provides functionality to start mock servers.

func NewMockServersServiceImp

func NewMockServersServiceImp(logger logger.Logger) *MockServersServiceImp

func (*MockServersServiceImp) IsMockServerRunningOnGivenPortAndProctocol

func (s *MockServersServiceImp) IsMockServerRunningOnGivenPortAndProctocol(port int, protocol string) bool

IsMockServerRunning returns true if on given port and protocol any server is running.

func (*MockServersServiceImp) Start

Start starts a mock server of the given type and port.

func (*MockServersServiceImp) StartHTTPSServer

func (s *MockServersServiceImp) StartHTTPSServer(port int, protocol string, cert string, key string) error

func (*MockServersServiceImp) StartHTTPServer

func (s *MockServersServiceImp) StartHTTPServer(port int, protocol string) error

func (*MockServersServiceImp) StartTCPServer

func (s *MockServersServiceImp) StartTCPServer(port int, protocol string) error

func (*MockServersServiceImp) StartUDPServer

func (s *MockServersServiceImp) StartUDPServer(port int, protocol string) error

func (*MockServersServiceImp) Stop

Stop stops a mock server of the given type on given port.

func (*MockServersServiceImp) StopHTTPSServer

func (s *MockServersServiceImp) StopHTTPSServer(port int, protocol string) error

func (*MockServersServiceImp) StopHTTPServer

func (s *MockServersServiceImp) StopHTTPServer(port int, protocol string) error

func (*MockServersServiceImp) StopTCPServer

func (s *MockServersServiceImp) StopTCPServer(port int, protocol string) error

func (*MockServersServiceImp) StopUDPServer

func (s *MockServersServiceImp) StopUDPServer(port int, protocol string) error

type MockServersServiceMock

type MockServersServiceMock struct {
	StartFunc func(cfg *models.StartMockServerRequestBody) error
	StopFunc  func(cfg *models.StopMockServerRequestBody) error
}

func (*MockServersServiceMock) Start

func (*MockServersServiceMock) Stop

Jump to

Keyboard shortcuts

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