Documentation
¶
Index ¶
- Constants
- Variables
- func NewHandler() interfaces.CardinalHandler
- type BuildCmd
- type CardinalCmd
- type DevCmd
- type Handler
- func (h *Handler) Build(ctx context.Context, f models.BuildCardinalFlags) error
- func (h *Handler) Dev(ctx context.Context, f models.DevCardinalFlags) error
- func (h *Handler) Purge(ctx context.Context, f models.PurgeCardinalFlags) error
- func (h *Handler) Restart(ctx context.Context, f models.RestartCardinalFlags) error
- func (h *Handler) Start(ctx context.Context, f models.StartCardinalFlags) error
- func (h *Handler) Stop(ctx context.Context, f models.StopCardinalFlags) error
- type MockHandler
- func (m *MockHandler) Build(ctx context.Context, flags models.BuildCardinalFlags) error
- func (m *MockHandler) Dev(ctx context.Context, flags models.DevCardinalFlags) error
- func (m *MockHandler) Purge(ctx context.Context, flags models.PurgeCardinalFlags) error
- func (m *MockHandler) Restart(ctx context.Context, flags models.RestartCardinalFlags) error
- func (m *MockHandler) Start(ctx context.Context, flags models.StartCardinalFlags) error
- func (m *MockHandler) Stop(ctx context.Context, flags models.StopCardinalFlags) error
- type PurgeCmd
- type RestartCmd
- type StartCmd
- type StopCmd
Constants ¶
View Source
const ( CardinalPort = "4040" RedisPort = "6379" )
View Source
const (
// DockerCardinalEnvLogLevel Environment variable name for Docker.
DockerCardinalEnvLogLevel = "CARDINAL_LOG_LEVEL"
)
Variables ¶
View Source
var CardinalCmdPlugin struct { Cardinal *CardinalCmd `cmd:"" group:"Cardinal Commands:" help:"Manage your Cardinal game shard"` }
View Source
var (
ErrGracefulExit = eris.New("Process gracefully exited")
)
Functions ¶
func NewHandler ¶
func NewHandler() interfaces.CardinalHandler
Types ¶
type BuildCmd ¶ added in v1.8.0
type BuildCmd struct {
Parent *CardinalCmd `kong:"-"`
LogLevel string ` flag:"" help:"Set the log level for Cardinal"`
Debug bool ` flag:"" help:"Enable debugging"`
Telemetry bool ` flag:"" help:"Enable tracing, metrics, and profiling"`
Push string ` flag:"" help:"Push your cardinal image to a given image repository" hidden:"true"`
Auth string ` flag:"" help:"Auth token for the given image repository" hidden:"true"`
User string ` flag:"" help:"User for the given image repository" hidden:"true"`
Pass string ` flag:"" help:"Password for the given image repository" hidden:"true"`
RegToken string ` flag:"" help:"Registry token for the given image repository" hidden:"true"`
}
type CardinalCmd ¶ added in v1.8.0
type CardinalCmd struct {
Config string `flag:"" type:"existingfile" help:"A TOML config file"`
Context context.Context ` kong:"-"`
Dependencies cmdsetup.Dependencies ` kong:"-"`
Start *StartCmd `cmd:"" group:"Cardinal Commands:" help:"Launch your Cardinal game environment"`
Stop *StopCmd `cmd:"" group:"Cardinal Commands:" help:"Gracefully shut down your Cardinal game environment"`
Restart *RestartCmd `cmd:"" group:"Cardinal Commands:" help:"Restart your Cardinal game environment"`
Dev *DevCmd `cmd:"" group:"Cardinal Commands:" help:"Run Cardinal in fast development mode with hot reloading"`
Purge *PurgeCmd `cmd:"" group:"Cardinal Commands:" help:"Reset your Cardinal game shard to a clean state by removing all data and containers"`
Build *BuildCmd `cmd:"" group:"Cardinal Commands:" help:"Build and package your Cardinal game into production-ready Docker images"`
}
func (*CardinalCmd) Run ¶ added in v1.8.0
func (c *CardinalCmd) Run() error
type DevCmd ¶ added in v1.8.0
type DevCmd struct {
Parent *CardinalCmd `kong:"-"`
Editor bool ` flag:"" help:"Enable Cardinal Editor"`
PrettyLog bool ` flag:"" help:"Run Cardinal with pretty logging" default:"true"`
}
type Handler ¶
type Handler struct {
}
type MockHandler ¶
func (*MockHandler) Build ¶
func (m *MockHandler) Build(ctx context.Context, flags models.BuildCardinalFlags) error
func (*MockHandler) Dev ¶
func (m *MockHandler) Dev(ctx context.Context, flags models.DevCardinalFlags) error
func (*MockHandler) Purge ¶
func (m *MockHandler) Purge(ctx context.Context, flags models.PurgeCardinalFlags) error
func (*MockHandler) Restart ¶
func (m *MockHandler) Restart(ctx context.Context, flags models.RestartCardinalFlags) error
func (*MockHandler) Start ¶
func (m *MockHandler) Start(ctx context.Context, flags models.StartCardinalFlags) error
func (*MockHandler) Stop ¶
func (m *MockHandler) Stop(ctx context.Context, flags models.StopCardinalFlags) error
type PurgeCmd ¶ added in v1.8.0
type PurgeCmd struct {
Parent *CardinalCmd `kong:"-"`
}
type RestartCmd ¶ added in v1.8.0
type RestartCmd struct {
Parent *CardinalCmd `kong:"-"`
Detach bool ` flag:"" help:"Run in detached mode"`
Debug bool ` flag:"" help:"Enable debugging"`
}
func (*RestartCmd) Run ¶ added in v1.8.0
func (c *RestartCmd) Run() error
type StartCmd ¶ added in v1.8.0
type StartCmd struct {
Parent *CardinalCmd `kong:"-"`
Detach bool ` flag:"" help:"Run in detached mode"`
LogLevel string ` flag:"" help:"Set the log level for Cardinal"`
Debug bool ` flag:"" help:"Enable delve debugging"`
Telemetry bool ` flag:"" help:"Enable tracing, metrics, and profiling"`
Editor bool ` flag:"" help:"Run Cardinal Editor, useful for prototyping and debugging"`
EditorPort string ` flag:"" help:"Port for Cardinal Editor" default:"auto"`
}
Click to show internal directories.
Click to hide internal directories.