runner

package
Version: v0.0.0-...-205fa7b Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: MPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EntryPattern = `[OnGameModeInit] FIRST_INIT`
	ExitPattern  = `[OnScriptExit] LAST_EXIT`
	ErrorPattern = `Run time error`

	ChunkDebugStart = `[debug] AMX backtrace:`
	ChunkErrorStart = `[error] UNHANDLED ERRORS:`
)

Variables

View Source
var PluginPattern = regexp.MustCompile(`Loading plugin:\s(\w+)`)

Functions

func Ensure

func Ensure() error

func Run

func Run(cfg Config) error

func RunAPI

func RunAPI(ctx context.Context, ps *pubsub.PubSub, restartTime time.Duration)

func RunDiscord

func RunDiscord(ctx context.Context, ps *pubsub.PubSub, cfg Config)

func RunServer

func RunServer(ctx context.Context, ps *pubsub.PubSub, r io.Reader, w io.Writer, once bool)

func RunWatcher

func RunWatcher(parent context.Context, pcx *rook.PackageContext)

func WriteSettings

func WriteSettings(data string)

Types

type Config

type Config struct {
	Production           bool          `envconfig:"PRODUCTION"         default:"false"`
	LogLevel             zapcore.Level `envconfig:"LOG_LEVEL"          default:"info"`
	Settings             string        `envconfig:"SETTINGS_OVERRIDE"`
	Restart              time.Duration `envconfig:"AUTO_RESTART_TIME"  default:"1h"`
	AutoBuild            bool          `envconfig:"AUTO_BUILD"         default:"false"`
	DiscordToken         string        `envconfig:"DISCORD_TOKEN"      default:""`
	DiscordChannelInfo   string        `envconfig:"DISCORD_CHANNEL_INFO"    default:""`
	DiscordChannelErrors string        `envconfig:"DISCORD_CHANNEL_ERRORS"    default:""`
	RconPassword         string        `envconfig:"RCON_PASSWORD"      default:"scavenge"`
}

type LogParser

type LogParser interface {
	GetWriter() io.Writer
}

type ReactiveParser

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

func (*ReactiveParser) GetWriter

func (p *ReactiveParser) GetWriter() io.Writer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to