bedrock

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	*raknet.Conn
	// contains filtered or unexported fields
}

Conn is a minecraft Connection

type ConnProcessor

type ConnProcessor struct {
	Log logr.Logger
}

Processing Node

func (ConnProcessor) ProcessConn

func (cp ConnProcessor) ProcessConn(c net.Conn) (bedprox.ProcessedConn, error)

type Gateway

type Gateway struct {
	ID                    string
	Listeners             []Listener
	ClientTimeout         time.Duration
	ServerIDs             []string
	Log                   logr.Logger
	ServerNotFoundMessage string
}

func (Gateway) GetID

func (gw Gateway) GetID() string

func (Gateway) GetServerIDs

func (gw Gateway) GetServerIDs() []string

func (*Gateway) ListenAndServe

func (gw *Gateway) ListenAndServe(cpnChan chan<- net.Conn) error

func (*Gateway) SetLogger

func (gw *Gateway) SetLogger(log logr.Logger)

type Listener

type Listener struct {
	Bind                 string
	ReceiveProxyProtocol bool
	ReceiveRealIP        bool
	PingStatus           PingStatus

	*raknet.Listener
}

type PingStatus

type PingStatus struct {
	Edition         string
	ProtocolVersion int
	VersionName     string
	PlayerCount     int
	MaxPlayerCount  int
	GameMode        string
	GameModeNumeric int
	MOTD            string
}

type ProcessedConn

type ProcessedConn struct {
	*Conn
	// contains filtered or unexported fields
}

func (ProcessedConn) Disconnect

func (c ProcessedConn) Disconnect(msg string) error

func (ProcessedConn) GatewayID

func (c ProcessedConn) GatewayID() string

func (ProcessedConn) RemoteAddr

func (c ProcessedConn) RemoteAddr() net.Addr

func (ProcessedConn) ServerAddr

func (c ProcessedConn) ServerAddr() string

func (ProcessedConn) ServerNotFoundMessage

func (c ProcessedConn) ServerNotFoundMessage() string

func (ProcessedConn) Username

func (c ProcessedConn) Username() string

type Server

type Server struct {
	ID                 string
	Domains            []string
	Dialer             raknet.Dialer
	DialTimeout        time.Duration
	Address            string
	SendProxyProtocol  bool
	DialTimeoutMessage string
	WebhookIDs         []string
	Log                logr.Logger
}

func (Server) Dial

func (s Server) Dial() (*raknet.Conn, error)

func (Server) GetDomains

func (s Server) GetDomains() []string

func (Server) GetID

func (s Server) GetID() string

func (Server) GetWebhookIDs

func (s Server) GetWebhookIDs() []string

func (Server) ProcessConn

func (s Server) ProcessConn(c net.Conn, webhooks []webhook.Webhook) (bedprox.ConnTunnel, error)

func (*Server) SetLogger

func (s *Server) SetLogger(log logr.Logger)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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