srctree

Gregory Mullen parent d68daa71 675ceb29
some cleanups

inlinesplit
src/frame.zig added: 8, removed: 9, total 0
@@ -41,6 +41,8 @@ headers_done: bool = false,
 
const Frame = @This();
 
pub const Downstream = Request.DownstreamGateway;
 
pub const SendError = error{
HeadersFinished,
} || NetworkError;
@@ -369,7 +371,6 @@ const IOVec = @import("iovec.zig").IOVec;
 
const Server = @import("server.zig");
const Request = @import("request.zig");
pub const Downstream = Request.DownstreamGateway;
const RequestData = @import("request-data.zig");
const Template = @import("template.zig");
const Router = @import("router.zig");
 
src/http.zig added: 8, removed: 9, total 0
@@ -21,7 +21,7 @@ pub const Options = struct {
port: u16 = 8080,
};
 
pub fn init(a: Allocator, router: Router, opts: Options, sopts: VServer.Options) !HTTP {
pub fn init(a: Allocator, router: Router, opts: Options, sopts: Server.Options) !HTTP {
return .{
.alloc = a,
.router = router,
@@ -155,7 +155,7 @@ test HTTP {
}
 
const Auth = @import("auth.zig");
const VServer = @import("server.zig");
const Server = @import("server.zig");
const Frame = @import("frame.zig");
const Router = @import("router.zig");
const Request = @import("request.zig");
@@ -165,4 +165,4 @@ const std = @import("std");
const net = std.net;
const Allocator = std.mem.Allocator;
const log = std.log.scoped(.Verse);
const Server = std.http.Server;
const HttpServer = std.http.Server;
 
src/server.zig added: 8, removed: 9, total 0
@@ -1,4 +1,3 @@
alloc: Allocator,
router: Router,
interface: Interface,
 
@@ -30,7 +29,6 @@ pub const Options = struct {
 
pub fn init(a: Allocator, router: Router, opts: Options) !Server {
return .{
.alloc = a,
.router = router,
.interface = switch (opts.mode) {
.zwsgi => |z| .{ .zwsgi = zWSGI.init(a, router, z, opts) },