added + rename
This commit is contained in:
parent
25439eab5b
commit
1e2f442781
2 changed files with 30 additions and 2 deletions
28
cmd/main.go
Normal file
28
cmd/main.go
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"context"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
"os"
|
||||||
|
"os/signal"
|
||||||
|
"syscall"
|
||||||
|
"task-processor/config"
|
||||||
|
"task-processor/internal/app"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
c := config.NewConfig()
|
||||||
|
config.LogSetup(c.App.Mode, c.App.LogLvl)
|
||||||
|
|
||||||
|
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
|
||||||
|
defer cancel()
|
||||||
|
|
||||||
|
appl := app.NewApp(app.Deps{
|
||||||
|
Config: c,
|
||||||
|
RootCtx: ctx,
|
||||||
|
})
|
||||||
|
|
||||||
|
if err := appl.Run(); err != nil {
|
||||||
|
log.WithError(err).Fatal("Application run failed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
import "google/protobuf/empty.proto";
|
import "google/protobuf/empty.proto";
|
||||||
|
|
||||||
package taskProcessor;
|
package taskTransport;
|
||||||
option go_package = "./taskProcessor";
|
option go_package = "/pkg/taskTransport/v1;taskTransportV1";
|
||||||
|
|
||||||
|
|
||||||
message Task{
|
message Task{
|
||||||
Loading…
Add table
Add a link
Reference in a new issue