minecraft

package
v0.1.4-0...-01a136e Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: ISC Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLinuxDownload

func GetLinuxDownload() (string, error)

Types

type Logger

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

func NewLogger

func NewLogger() *Logger

func (*Logger) Subscribe

func (l *Logger) Subscribe() (int, <-chan string)

func (*Logger) Unsubscribe

func (l *Logger) Unsubscribe(id int)

func (*Logger) Write

func (l *Logger) Write(p []byte) (n int, err error)

type Manager

type Manager struct {
	Servers map[int64]*Server
	// contains filtered or unexported fields
}

func NewManager

func NewManager(db *sql.DB) (*Manager, error)

Creates a new Manager and loads every Minecraft server in db

func (*Manager) AddServer

func (m *Manager) AddServer(id int64) error

func (*Manager) Run

func (m *Manager) Run()

type Server

type Server struct {
	LogFile string
	Logger  *Logger
	// contains filtered or unexported fields
}

func (*Server) Backup

func (m *Server) Backup() error

func (*Server) Command

func (m *Server) Command(command string) error

func (*Server) GetDir

func (m *Server) GetDir() string

func (*Server) GetState

func (m *Server) GetState() State

func (*Server) Install

func (m *Server) Install() error

func (*Server) Restore

func (m *Server) Restore(backup string) error

func (*Server) Start

func (m *Server) Start() error

func (*Server) Stop

func (m *Server) Stop() error

func (*Server) Update

func (m *Server) Update() error

type State

type State int
const (
	Empty State = iota
	Installing
	Stopped
	Running
	BackingUp
	Restoring
)

func (State) ToString

func (s State) ToString() string

Jump to

Keyboard shortcuts

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