Documentation
¶
Index ¶
- Constants
- Variables
- func Ensure() error
- func Run(cfg Config) error
- func RunAPI(ctx context.Context, ps *pubsub.PubSub, restartTime time.Duration)
- func RunDiscord(ctx context.Context, ps *pubsub.PubSub, cfg Config)
- func RunServer(ctx context.Context, ps *pubsub.PubSub, r io.Reader, w io.Writer, once bool)
- func RunWatcher(parent context.Context, pcx *rook.PackageContext)
- func WriteSettings(data string)
- type Config
- type LogParser
- type ReactiveParser
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 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 ReactiveParser ¶
type ReactiveParser struct {
// contains filtered or unexported fields
}
func (*ReactiveParser) GetWriter ¶
func (p *ReactiveParser) GetWriter() io.Writer
Click to show internal directories.
Click to hide internal directories.