From babbdca699b68f10716c81ceef74e916114cb575 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 1 Oct 2017 08:23:08 -0700 Subject: [PATCH] move everything in lib/ to internal/ --- cmd/route-httpagent/main.go | 2 +- {lib => internal}/elfs/elfs.go | 0 internal/server/backend.go | 2 +- internal/server/route.go | 2 +- internal/server/server.go | 5 ++--- internal/server/storage.go | 2 +- {lib => internal}/tun2/backend.go | 0 {lib => internal}/tun2/client.go | 0 {lib => internal}/tun2/connection.go | 0 {lib => internal}/tun2/server.go | 0 plugins/autohttpagent/main.go | 2 +- 11 files changed, 7 insertions(+), 8 deletions(-) rename {lib => internal}/elfs/elfs.go (100%) rename {lib => internal}/tun2/backend.go (100%) rename {lib => internal}/tun2/client.go (100%) rename {lib => internal}/tun2/connection.go (100%) rename {lib => internal}/tun2/server.go (100%) diff --git a/cmd/route-httpagent/main.go b/cmd/route-httpagent/main.go index 57ac67b..8c74581 100644 --- a/cmd/route-httpagent/main.go +++ b/cmd/route-httpagent/main.go @@ -5,7 +5,7 @@ import ( "crypto/tls" "flag" - "git.xeserv.us/xena/route/lib/tun2" + "git.xeserv.us/xena/route/internal/tun2" "github.com/Xe/ln" "github.com/facebookgo/flagenv" ) diff --git a/lib/elfs/elfs.go b/internal/elfs/elfs.go similarity index 100% rename from lib/elfs/elfs.go rename to internal/elfs/elfs.go diff --git a/internal/server/backend.go b/internal/server/backend.go index 88204e5..3efa441 100644 --- a/internal/server/backend.go +++ b/internal/server/backend.go @@ -1,7 +1,7 @@ package server import ( - "git.xeserv.us/xena/route/lib/tun2" + "git.xeserv.us/xena/route/internal/tun2" proto "git.xeserv.us/xena/route/proto" "github.com/Xe/ln" "golang.org/x/net/context" diff --git a/internal/server/route.go b/internal/server/route.go index 7f5a28c..a633c8a 100644 --- a/internal/server/route.go +++ b/internal/server/route.go @@ -1,7 +1,7 @@ package server import ( - "git.xeserv.us/xena/route/lib/elfs" + "git.xeserv.us/xena/route/internal/elfs" proto "git.xeserv.us/xena/route/proto" "github.com/Xe/ln" "golang.org/x/net/context" diff --git a/internal/server/server.go b/internal/server/server.go index 11745fe..6cbfbd4 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -9,10 +9,9 @@ import ( "time" "git.xeserv.us/xena/route/internal/database" - "git.xeserv.us/xena/route/lib/tun2" + "git.xeserv.us/xena/route/internal/tun2" proto "git.xeserv.us/xena/route/proto" "github.com/mtneug/pkg/ulid" - "github.com/oxtoacart/bpool" "golang.org/x/crypto/acme/autocert" "google.golang.org/grpc" "google.golang.org/grpc/credentials" @@ -141,7 +140,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { Director: s.Director, Transport: s.ts, FlushInterval: 1 * time.Second, - BufferPool: bpool.NewBytePool(256, 4096), + //BufferPool: bpool.NewBytePool(256, 4096), } rp.ServeHTTP(w, r) diff --git a/internal/server/storage.go b/internal/server/storage.go index 175a1cf..23f2e55 100644 --- a/internal/server/storage.go +++ b/internal/server/storage.go @@ -4,7 +4,7 @@ import ( "context" "git.xeserv.us/xena/route/internal/database" - "git.xeserv.us/xena/route/lib/tun2" + "git.xeserv.us/xena/route/internal/tun2" ) type storageWrapper struct { diff --git a/lib/tun2/backend.go b/internal/tun2/backend.go similarity index 100% rename from lib/tun2/backend.go rename to internal/tun2/backend.go diff --git a/lib/tun2/client.go b/internal/tun2/client.go similarity index 100% rename from lib/tun2/client.go rename to internal/tun2/client.go diff --git a/lib/tun2/connection.go b/internal/tun2/connection.go similarity index 100% rename from lib/tun2/connection.go rename to internal/tun2/connection.go diff --git a/lib/tun2/server.go b/internal/tun2/server.go similarity index 100% rename from lib/tun2/server.go rename to internal/tun2/server.go diff --git a/plugins/autohttpagent/main.go b/plugins/autohttpagent/main.go index 4dc1926..d2d8de2 100644 --- a/plugins/autohttpagent/main.go +++ b/plugins/autohttpagent/main.go @@ -9,7 +9,7 @@ import ( "os" "time" - "git.xeserv.us/xena/route/lib/tun2" + "git.xeserv.us/xena/route/internal/tun2" "github.com/Xe/ln" )