gamesrv

package
v0.0.0-...-72177e3 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLastServerVersion

func GetLastServerVersion() (string, bool, error)

func LaunchInteractiveRcon

func LaunchInteractiveRcon()

func LaunchServer

func LaunchServer(config *runner.Config, srv *ServerInstance) error

func MonitorServer

func MonitorServer(config *runner.Config, srv *ServerInstance, stdout io.ReadCloser) error

func RemoveLastServerVersion

func RemoveLastServerVersion() error

func SaveLastServerVersion

func SaveLastServerVersion(config *runner.Config) error

func SendStartedEvent

func SendStartedEvent(config *runner.Config, srv *ServerInstance)

Types

type Rcon

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

func NewRcon

func NewRcon(addr, password string) *Rcon

func (*Rcon) Execute

func (self *Rcon) Execute(cmd string) (string, error)

type ServerInstance

type ServerInstance struct {
	Name                string
	FinishWG            sync.WaitGroup
	ShouldStop          bool
	StartupFailed       bool
	IsServerInitialized bool
	IsGameFinished      bool
	RestartRequested    bool
	Crashed             bool

	ServerPid int
	Rcon      *Rcon
	// contains filtered or unexported fields
}

func New

func New() *ServerInstance

func (*ServerInstance) AddToOp

func (srv *ServerInstance) AddToOp(players []string)

func (*ServerInstance) AddToWhiteList

func (srv *ServerInstance) AddToWhiteList(players []string)

func (*ServerInstance) GetSeed

func (srv *ServerInstance) GetSeed() (string, error)

func (*ServerInstance) QuickUndo

func (srv *ServerInstance) QuickUndo() error

func (*ServerInstance) SaveAll

func (srv *ServerInstance) SaveAll() error

func (*ServerInstance) SendChat

func (srv *ServerInstance) SendChat(message string) error

func (*ServerInstance) Stop

func (srv *ServerInstance) Stop()

func (*ServerInstance) Wait

func (srv *ServerInstance) Wait()

Jump to

Keyboard shortcuts

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