minecraft

package
v0.0.0-...-1d4e844 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package minecraft is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockServer

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

MockServer is a mock of Server interface.

func NewMockServer

func NewMockServer(ctrl *gomock.Controller) *MockServer

NewMockServer creates a new mock instance.

func (*MockServer) EXPECT

func (m *MockServer) EXPECT() *MockServerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockServer) GetProcess

func (m *MockServer) GetProcess() *exec.Cmd

GetProcess mocks base method.

func (*MockServer) PutCommand

func (m *MockServer) PutCommand(cmd string) error

PutCommand mocks base method.

func (*MockServer) Start

func (m *MockServer) Start() (chan string, chan string, error)

Start mocks base method.

func (*MockServer) Stop

func (m *MockServer) Stop() error

Stop mocks base method.

type MockServerMockRecorder

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

MockServerMockRecorder is the mock recorder for MockServer.

func (*MockServerMockRecorder) GetProcess

func (mr *MockServerMockRecorder) GetProcess() *gomock.Call

GetProcess indicates an expected call of GetProcess.

func (*MockServerMockRecorder) PutCommand

func (mr *MockServerMockRecorder) PutCommand(cmd interface{}) *gomock.Call

PutCommand indicates an expected call of PutCommand.

func (*MockServerMockRecorder) Start

func (mr *MockServerMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start.

func (*MockServerMockRecorder) Stop

func (mr *MockServerMockRecorder) Stop() *gomock.Call

Stop indicates an expected call of Stop.

type Server

type Server interface {
	// Start subprocess and returns stdout and stderr channel.
	Start() (chan string, chan string, error)

	// If server is already exited or stop command is sent successfully, return nil, otherwise return error.
	Stop() error

	// Send command to the minecraft server process.
	PutCommand(cmd string) error

	// Get minecraft server process
	GetProcess() *exec.Cmd
}

func NewServer

func NewServer(cfg *config.MinecraftConfig) (Server, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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