-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99cfd28
commit 9102110
Showing
45 changed files
with
3,959 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS build | ||
|
||
ARG SERVICE_NAME=kurushimi | ||
|
||
WORKDIR /build | ||
|
||
# Copy sources | ||
COPY . . | ||
|
||
WORKDIR /build/services/$SERVICE_NAME | ||
|
||
RUN go mod download | ||
|
||
WORKDIR /build | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
RUN --mount=type=cache,target=/root/.cache/go-build \ | ||
--mount=type=cache,target=/go/pkg \ | ||
CGO_ENABLED=0 \ | ||
GOOS=$TARGETOS \ | ||
GOARCH=$TARGETARCH \ | ||
go build -ldflags="-s -w" -o $SERVICE_NAME ./services/$SERVICE_NAME/cmd/$SERVICE_NAME | ||
|
||
FROM alpine | ||
|
||
ARG SERVICE_NAME=kurushimi | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /build/$SERVICE_NAME /build/services/$SERVICE_NAME/run ./ | ||
CMD ["./kurushimi"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package main | ||
|
||
import ( | ||
"github.com/emortalmc/mono-services/services/kurushimi/internal/app" | ||
"github.com/emortalmc/mono-services/services/kurushimi/internal/config" | ||
"go.uber.org/zap" | ||
"log" | ||
) | ||
|
||
func main() { | ||
cfg := config.LoadGlobalConfig() | ||
|
||
unsugared, err := createLogger(cfg) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
logger := unsugared.Sugar() | ||
|
||
app.Run(cfg, logger) | ||
} | ||
|
||
func createLogger(cfg config.Config) (logger *zap.Logger, err error) { | ||
if cfg.Development { | ||
logger, err = zap.NewDevelopment() | ||
} else { | ||
logger, err = zap.NewProduction() | ||
} | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
module github.com/emortalmc/mono-services/services/kurushimi | ||
|
||
go 1.23 | ||
|
||
require ( | ||
agones.dev/agones v1.42.0 | ||
github.com/emortalmc/live-config-parser/golang v0.0.0-20231228020729-d2b6294e5968 | ||
github.com/emortalmc/proto-specs/gen/go v0.0.0-20240927103241-2584fd28e0f9 | ||
github.com/google/uuid v1.6.0 | ||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.1 | ||
github.com/spf13/pflag v1.0.5 | ||
github.com/spf13/viper v1.19.0 | ||
go.mongodb.org/mongo-driver v1.17.1 | ||
go.uber.org/zap v1.27.0 | ||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 | ||
google.golang.org/grpc v1.67.1 | ||
google.golang.org/protobuf v1.35.1 | ||
k8s.io/apimachinery v0.29.0 | ||
k8s.io/client-go v0.29.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect | ||
github.com/emicklei/go-restful/v3 v3.11.0 // indirect | ||
github.com/fsnotify/fsnotify v1.7.0 // indirect | ||
github.com/go-logr/logr v1.4.1 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.6 // indirect | ||
github.com/go-openapi/jsonreference v0.20.2 // indirect | ||
github.com/go-openapi/spec v0.19.5 // indirect | ||
github.com/go-openapi/swag v0.22.3 // indirect | ||
github.com/gogo/protobuf v1.3.2 // indirect | ||
github.com/golang/protobuf v1.5.4 // indirect | ||
github.com/golang/snappy v0.0.4 // indirect | ||
github.com/google/gnostic-models v0.6.8 // indirect | ||
github.com/google/gofuzz v1.2.0 // indirect | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.17.1 // indirect | ||
github.com/hashicorp/hcl v1.0.0 // indirect | ||
github.com/imdario/mergo v0.3.6 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/klauspost/compress v1.17.2 // indirect | ||
github.com/magiconair/properties v1.8.7 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect | ||
github.com/mitchellh/mapstructure v1.5.0 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/montanaflynn/stats v0.7.1 // indirect | ||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect | ||
github.com/pelletier/go-toml/v2 v2.2.2 // indirect | ||
github.com/pierrec/lz4/v4 v4.1.18 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/sagikazarmark/locafero v0.4.0 // indirect | ||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect | ||
github.com/segmentio/kafka-go v0.4.47 // indirect | ||
github.com/sirupsen/logrus v1.9.0 // indirect | ||
github.com/sourcegraph/conc v0.3.0 // indirect | ||
github.com/spf13/afero v1.11.0 // indirect | ||
github.com/spf13/cast v1.6.0 // indirect | ||
github.com/subosito/gotenv v1.6.0 // indirect | ||
github.com/xdg-go/pbkdf2 v1.0.0 // indirect | ||
github.com/xdg-go/scram v1.1.2 // indirect | ||
github.com/xdg-go/stringprep v1.0.4 // indirect | ||
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect | ||
go.uber.org/multierr v1.10.0 // indirect | ||
golang.org/x/crypto v0.26.0 // indirect | ||
golang.org/x/net v0.28.0 // indirect | ||
golang.org/x/oauth2 v0.22.0 // indirect | ||
golang.org/x/sync v0.8.0 // indirect | ||
golang.org/x/sys v0.24.0 // indirect | ||
golang.org/x/term v0.23.0 // indirect | ||
golang.org/x/text v0.17.0 // indirect | ||
golang.org/x/time v0.5.0 // indirect | ||
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect | ||
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect | ||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect | ||
gopkg.in/fsnotify.v1 v1.4.7 // indirect | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/ini.v1 v1.67.0 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
k8s.io/api v0.29.0 // indirect | ||
k8s.io/klog/v2 v2.110.1 // indirect | ||
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect | ||
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect | ||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect | ||
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect | ||
sigs.k8s.io/yaml v1.3.0 // indirect | ||
) |
Oops, something went wrong.