manager

package
v0.0.0-...-c916df9 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateObscure = iota - 1
	StateStopped
	StatePending // server machine is booting up + minecraft server is not responding, prev state is stopped
	StateRunning
	StateStopping // minecraft server not responding, prev state is running
)

Variables

View Source
var ErrNop = fmt.Errorf("Nop")

Functions

This section is empty.

Types

type EC2Manager

type EC2Manager struct {
	CredentialsPath string `json:"credentialsPath"`
	InstanceId      string `json:"instanceId"`
	Region          string `json:"region"`
	Profile         string `json:"profile"`
	Port            uint16 `json:"port"`
	Timeout         int    `json:"timeout"` // unit: seconds
	// contains filtered or unexported fields
}

EC2

func NewEC2Manager

func NewEC2Manager(cp, id, rg, pf string, p uint16, to int) *EC2Manager

func NewEC2ManagerJson

func NewEC2ManagerJson(data []byte) (*EC2Manager, error)

func (*EC2Manager) Addr

func (ec2 *EC2Manager) Addr() string

func (*EC2Manager) Dial

func (ec2 *EC2Manager) Dial() (net.Conn, error)

func (*EC2Manager) Start

func (ec2 *EC2Manager) Start() error

func (*EC2Manager) State

func (ec2 *EC2Manager) State() (int, error)

type Manager

type Manager interface {
	Start() error
	State() (int, error)
	Addr() string
	Dial() (net.Conn, error)
}

type NopManager

type NopManager struct {
}

func NewNopManager

func NewNopManager() *NopManager

func (*NopManager) Addr

func (nop *NopManager) Addr() string

func (*NopManager) Dial

func (nop *NopManager) Dial() (net.Conn, error)

func (*NopManager) Start

func (nop *NopManager) Start() error

func (*NopManager) State

func (nop *NopManager) State() (int, error)

Jump to

Keyboard shortcuts

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