rcon

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout = errors.New("RCON connection is not established within deadline threshold")
)

Functions

func Modules

func Modules() fx.Option

func NewRCON

func NewRCON() func(NewRCONParams) (RCON, error)

Types

type NewRCONParams

type NewRCONParams struct {
	fx.In

	Lifecycle fx.Lifecycle
	Config    *configs.Config
	Logger    *logger.Logger
}

type RCON

type RCON interface {
	Close() error
	Execute(ctx context.Context, command string) (string, error)
	LocalAddr() net.Addr
	RemoteAddr() net.Addr
	IsReady() bool
}

type RCONConn

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

func (*RCONConn) Execute

func (r *RCONConn) Execute(ctx context.Context, command string) (string, error)

func (*RCONConn) IsReady

func (r *RCONConn) IsReady() bool

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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