Switch to git.jochum.dev

master
René Jochum 2 years ago
parent 939579892c
commit aad874e64f
Signed by: jochum
GPG Key ID: F7D906F5E51E8E5E

@ -1,6 +1,6 @@
SPDXVersion: SPDX-2.1 SPDXVersion: SPDX-2.1
DataLicense: CC0-1.0 DataLicense: CC0-1.0
Creator: René Jochum (rene@jochum.dev) Creator: René Jochum (rene@jochum.dev)
PackageName: github.com/go-micro/router PackageName: git.jochum.dev/jo-micro/router
PackageOriginator: René Jochum PackageOriginator: René Jochum
PackageLicenseDeclared: Apache-2.0 OR GPL-2.0-or-later PackageLicenseDeclared: Apache-2.0 OR GPL-2.0-or-later

@ -17,12 +17,12 @@ It looks for services that host "proto/routerclientpb/routerclientpb.RouterClien
## Examples ## Examples
Have a look at [internalService](https://github.com/go-micro/router/blob/master/cmd/microrouterd/main.go#L35) or the author's FOSS project [microlobby](https://github.com/pcdummy/microlobby). Have a look at [internalService](https://git.jochum.dev/jo-micro/router/blob/master/cmd/microrouterd/main.go#L35) or the author's FOSS project [microlobby](https://github.com/pcdummy/microlobby).
Here's some code from the microlobby project Here's some code from the microlobby project
```go ```go
import ( import (
"github.com/go-micro/router" "git.jochum.dev/jo-micro/router"
"github.com/urfave/cli/v2" "github.com/urfave/cli/v2"
"go-micro.dev/v4" "go-micro.dev/v4"
"wz2100.net/microlobby/shared/proto/authservicepb/v1" "wz2100.net/microlobby/shared/proto/authservicepb/v1"

@ -5,13 +5,13 @@ import (
"go-micro.dev/v4" "go-micro.dev/v4"
"go-micro.dev/v4/logger" "go-micro.dev/v4/logger"
"git.jochum.dev/jo-micro/router"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
httpServer "github.com/go-micro/plugins/v4/server/http" httpServer "github.com/go-micro/plugins/v4/server/http"
"github.com/go-micro/router"
"github.com/go-micro/router/internal/config" "git.jochum.dev/jo-micro/router/internal/config"
"github.com/go-micro/router/internal/handler" "git.jochum.dev/jo-micro/router/internal/handler"
"github.com/go-micro/router/internal/proto/routerserverpb" "git.jochum.dev/jo-micro/router/internal/proto/routerserverpb"
) )
func internalService(engine *gin.Engine) { func internalService(engine *gin.Engine) {

@ -13,7 +13,7 @@ ENV GOPATH="/go"
ARG CACHEBUST=1 ARG CACHEBUST=1
ARG VERSION ARG VERSION
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -installsuffix cgo -ldflags="-w -s -X 'github.com/go-micro/router/internal/config.Version=$VERSION'" -o /usr/local/bin/microrouterd github.com/go-micro/router/cmd/microrouterd RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -installsuffix cgo -ldflags="-w -s -X 'git.jochum.dev/jo-micro/router/internal/config.Version=$VERSION'" -o /usr/local/bin/microrouterd git.jochum.dev/jo-micro/router/cmd/microrouterd
# STEP 2 build a small image # STEP 2 build a small image
# start from busybox # start from busybox

@ -1,4 +1,4 @@
module github.com/go-micro/router module git.jochum.dev/jo-micro/router
go 1.19 go 1.19

@ -3,13 +3,13 @@ package router
import ( import (
"context" "context"
"github.com/go-micro/router/internal/proto/routerclientpb" "git.jochum.dev/jo-micro/router/internal/proto/routerclientpb"
"github.com/go-micro/router/internal/util" "git.jochum.dev/jo-micro/router/internal/util"
"go-micro.dev/v4/server" "go-micro.dev/v4/server"
"google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/emptypb"
) )
// Handler is the handler for github.com/go-micro/router/proto/routerpb.RrouterService // Handler is the handler for git.jochum.dev/jo-micro/router/proto/routerpb.RrouterService
type Handler struct { type Handler struct {
routerURI string routerURI string
routes []*routerclientpb.RoutesReply_Route routes []*routerclientpb.RoutesReply_Route

@ -6,7 +6,7 @@ var (
const ( const (
Name = "go.micro.router" Name = "go.micro.router"
PkgPath = "github.com/go-micro/router" PkgPath = "git.jochum.dev/jo-micro/router"
) )
const ( const (

@ -4,9 +4,9 @@ import (
"os" "os"
"strings" "strings"
"git.jochum.dev/jo-micro/router/internal/util"
"github.com/go-micro/plugins/v4/config/encoder/toml" "github.com/go-micro/plugins/v4/config/encoder/toml"
"github.com/go-micro/plugins/v4/config/encoder/yaml" "github.com/go-micro/plugins/v4/config/encoder/yaml"
"github.com/go-micro/router/internal/util"
"github.com/pkg/errors" "github.com/pkg/errors"
"go-micro.dev/v4/config" "go-micro.dev/v4/config"
"go-micro.dev/v4/config/reader" "go-micro.dev/v4/config/reader"

@ -9,11 +9,11 @@ import (
"net/http" "net/http"
"time" "time"
"git.jochum.dev/jo-micro/router/internal/config"
"git.jochum.dev/jo-micro/router/internal/proto/routerclientpb"
"git.jochum.dev/jo-micro/router/internal/proto/routerserverpb"
"git.jochum.dev/jo-micro/router/internal/util"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/go-micro/router/internal/config"
"github.com/go-micro/router/internal/proto/routerclientpb"
"github.com/go-micro/router/internal/proto/routerserverpb"
"github.com/go-micro/router/internal/util"
"go-micro.dev/v4" "go-micro.dev/v4"
"go-micro.dev/v4/client" "go-micro.dev/v4/client"
"go-micro.dev/v4/errors" "go-micro.dev/v4/errors"

@ -2,7 +2,7 @@ syntax = "proto3";
package routerclientpb; package routerclientpb;
option go_package = "github.com/go-micro/router/proto/routerclientpb;routerclientpb"; option go_package = "git.jochum.dev/jo-micro/router/proto/routerclientpb;routerclientpb";
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";

@ -2,7 +2,7 @@ syntax = "proto3";
package routerserverpb; package routerserverpb;
option go_package = "github.com/go-micro/router/proto/routerserverpb;routerserverpb"; option go_package = "git.jochum.dev/jo-micro/router/proto/routerserverpb;routerserverpb";
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";

Loading…
Cancel
Save