Something went wrong. Try again.
xburner is an experimental HTTP and gRPC load generator written in Zig.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071const config = @import("../config.zig");const contracts = @import("../contracts.zig");
pub const CommandLineError = error{ OutOfMemory, MissingCommand, UnknownCommand, MissingConfigPath, MissingListenAddress, MissingAgentAddress, UnsupportedFlag, MissingWasmBackendValue, InvalidWasmBackend, ConflictingValidateMode, UnexpectedArgument,};
pub const Command = union(enum) { validate: ValidateCommand, run: RunCommand, run_distributed: DistributedRunCommand, agent: AgentCommand, help: HelpCommand, version,};
pub const HelpCommand = enum { general, validate, run, run_distributed, agent,};
pub const ValidateCommand = struct { config_path: []const u8, mode: contracts.ValidateMode, wasm_backend: ?config.WasmBackend = null,};
pub const RunCommand = struct { config_path: []const u8, wasm_backend: ?config.WasmBackend = null,};
pub const DistributedRunCommand = struct { config_path: []const u8, agent_addresses: []const []const u8, wasm_backend: ?config.WasmBackend = null,};
pub const AgentCommand = struct { listen_address: []const u8,};
pub fn commandLineErrorMessage(err: CommandLineError) []const u8 { return switch (err) { error.OutOfMemory => "out of memory", error.MissingCommand => "missing subcommand", error.UnknownCommand => "unknown subcommand", error.MissingConfigPath => "missing config path", error.MissingListenAddress => "missing value after --listen", error.MissingAgentAddress => "provide at least one --agent <ip:port>", error.UnsupportedFlag => "unsupported flag", error.MissingWasmBackendValue => "missing value after --wasm-backend", error.InvalidWasmBackend => "invalid wasm backend, expected wamr or wasm3", error.ConflictingValidateMode => "choose at most one of --with-setup or --dry-run", error.UnexpectedArgument => "unexpected extra argument", };}