Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor,feat: use soft serve backends, implement git & http servers, remove config repository, manage soft serve from ssh #231

Merged
merged 13 commits into from
Mar 23, 2023
Merged
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
cmd/soft/soft
./soft
.ssh
.repos
dist
testdata
data/
completions/
manpages/
manpages/
soft_serve_ed25519*
11 changes: 4 additions & 7 deletions cmd/soft/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ package main

import (
"context"
"fmt"
"os"
"os/signal"
"syscall"
"time"

"github.com/charmbracelet/log"

"github.com/charmbracelet/soft-serve/server"
"github.com/charmbracelet/soft-serve/server/config"
"github.com/spf13/cobra"
Expand All @@ -23,9 +20,10 @@ var (
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
cfg := config.DefaultConfig()
s := server.NewServer(cfg)

log.Print("Starting SSH server", "addr", fmt.Sprintf("%s:%d", cfg.BindAddr, cfg.Port))
s, err := server.NewServer(cfg)
if err != nil {
return err
}

done := make(chan os.Signal, 1)
lch := make(chan error, 1)
Expand All @@ -38,7 +36,6 @@ var (
signal.Notify(done, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
<-done

log.Print("Stopping SSH server", "addr", fmt.Sprintf("%s:%d", cfg.BindAddr, cfg.Port))
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
if err := s.Shutdown(ctx); err != nil {
Expand Down
155 changes: 0 additions & 155 deletions config/auth.go

This file was deleted.

Loading