diff --git a/main.go b/main.go index a376935..7fa23c6 100644 --- a/main.go +++ b/main.go @@ -1,5 +1,14 @@ package main +// ___ ____ ___ ___ +// \ \ / / | _ | __| \ \ / / || | __ || || _ | +// \ \/ / |___ | |__ \ \/ / || |___ || ||___| +// \ / | _ | _ | \ / || __ | || ||\\ +// \/ |___ |___ | \/ || ____| || || \\ + +// Copyright (c) 2021 Piotr Biernat. https://pbiernat.dev. MIT License +// Repo: https://git.pbiernat.dev/golang/vegvisir + import ( "vegvisir/server" ) diff --git a/server/server.go b/server/server.go index c9ffca7..3f34598 100644 --- a/server/server.go +++ b/server/server.go @@ -1,5 +1,14 @@ package server +// ___ ____ ___ ___ +// \ \ / / | _ | __| \ \ / / || | __ || || _ | +// \ \/ / |___ | |__ \ \/ / || |___ || ||___| +// \ / | _ | _ | \ / || __ | || ||\\ +// \/ |___ |___ | \/ || ____| || || \\ + +// Copyright (c) 2021 Piotr Biernat. https://pbiernat.dev. MIT License +// Repo: https://git.pbiernat.dev/golang/vegvisir + import ( "encoding/json" "io/ioutil" @@ -29,3 +38,23 @@ func (s *Server) LoadConfig(file string) error { return nil } + +// func Run(s *Server) { +// s.StartListener() + +// log.Println("Server started successfully...") + +// Wait for an interrupt +// c := make(chan os.Signal, 1) +// signal.Notify(c, os.Interrupt, os.Kill) +// <-c + +// log.Error("SIGKILL or SIGINT caught, shutting down...") + +// Attempt a graceful shutdown +// ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) +// defer cancel() + +// s.shutdownServers(ctx) +// log.Error("all listeners shut down.") +// }