Compare commits

...

29 Commits
v3 ... master

Author SHA1 Message Date
8ef3db84fd Merge pull request 'move to micro v4' (#119) from v4 into master
Reviewed-on: #119
2023-05-07 19:19:26 +03:00
5ce0755cae move to micro v4
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-05-07 19:19:01 +03:00
fad3693ddc Merge branch 'v3' 2023-05-07 19:15:49 +03:00
654f42f4b1 update go version
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-03-07 13:46:02 +03:00
eac258fa4a
Merge pull request #67 from unistack-org/dependabot/github_actions/dependabot/fetch-metadata-1.3.0
Bump dependabot/fetch-metadata from 1.2.1 to 1.3.0
2022-03-06 09:49:09 +03:00
164938c793
Merge pull request #68 from unistack-org/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-03-06 09:49:01 +03:00
0879aaf24b
Merge branch 'master' into dependabot/github_actions/dependabot/fetch-metadata-1.3.0 2022-03-06 09:48:20 +03:00
3555b3dcc0
Merge branch 'master' into dependabot/github_actions/actions/checkout-3 2022-03-06 09:48:13 +03:00
c64f678946
Update pr.yml 2022-03-06 09:47:32 +03:00
1e43c401e6
Merge branch 'master' into dependabot/github_actions/actions/checkout-3 2022-03-05 19:34:21 +03:00
3702299203
Merge branch 'master' into dependabot/github_actions/dependabot/fetch-metadata-1.3.0 2022-03-05 19:34:17 +03:00
00f589590d update workflows
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-03-05 19:19:41 +03:00
dependabot[bot]
28007e846e
Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 05:23:15 +00:00
dependabot[bot]
aa455ece7d
Bump dependabot/fetch-metadata from 1.2.1 to 1.3.0
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 05:23:11 +00:00
dependabot[bot]
2de6de4944
Bump google.golang.org/grpc from 1.43.0 to 1.44.0 (#61)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.43.0...v1.44.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-02-25 09:58:35 +03:00
dependabot[bot]
7bd9f097b7
Bump dependabot/fetch-metadata from 1.1.1 to 1.2.1 (#65)
Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.1.1 to 1.2.1.
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.1.1...v1.2.1)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-25 09:46:56 +03:00
dependabot[bot]
0791bff0ea
Bump golangci/golangci-lint-action from 2 to 3 (#66)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 2 to 3.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-25 09:38:39 +03:00
9c189df378
Merge pull request #63 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.21
Bump go.unistack.org/micro/v3 from 3.8.20 to 3.8.21
2022-01-31 08:28:19 +03:00
dependabot[bot]
70ad1c7871
Bump go.unistack.org/micro/v3 from 3.8.20 to 3.8.21
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.20 to 3.8.21.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.20...v3.8.21)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 05:27:18 +00:00
dbd6eb1889
Merge pull request #62 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.20
Bump go.unistack.org/micro/v3 from 3.8.19 to 3.8.20
2022-01-26 08:18:18 +03:00
dependabot[bot]
8a893dd1a7
Bump go.unistack.org/micro/v3 from 3.8.19 to 3.8.20
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.19 to 3.8.20.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.19...v3.8.20)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-26 05:17:37 +00:00
01b3c3cf15
Merge pull request #60 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.19
Bump go.unistack.org/micro/v3 from 3.8.18 to 3.8.19
2022-01-25 08:19:56 +03:00
dependabot[bot]
abf8219c36
Bump go.unistack.org/micro/v3 from 3.8.18 to 3.8.19
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.18 to 3.8.19.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.18...v3.8.19)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-25 05:19:05 +00:00
ebcfcfc753
Merge pull request #59 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.18
Bump go.unistack.org/micro/v3 from 3.8.16 to 3.8.18
2022-01-24 08:21:02 +03:00
dependabot[bot]
f479ea8937
Bump go.unistack.org/micro/v3 from 3.8.16 to 3.8.18
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.16 to 3.8.18.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.16...v3.8.18)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-24 05:19:40 +00:00
7533c3f6f2
Merge pull request #58 from unistack-org/dependabot/go_modules/go.unistack.org/micro/v3-3.8.16
Bump go.unistack.org/micro/v3 from 3.8.15 to 3.8.16
2022-01-21 08:16:09 +03:00
dependabot[bot]
04d20adebc
Bump go.unistack.org/micro/v3 from 3.8.15 to 3.8.16
Bumps [go.unistack.org/micro/v3](https://github.com/unistack-org/micro) from 3.8.15 to 3.8.16.
- [Release notes](https://github.com/unistack-org/micro/releases)
- [Commits](https://github.com/unistack-org/micro/compare/v3.8.15...v3.8.16)

---
updated-dependencies:
- dependency-name: go.unistack.org/micro/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-21 05:15:30 +00:00
308979d29c
logger updates (#57)
* logger: update for latest micro

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>

* update all

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2022-01-20 01:11:40 +03:00
dependabot[bot]
eb035fbfb5
Bump google.golang.org/grpc from 1.41.0 to 1.43.0 (#53)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.41.0 to 1.43.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.41.0...v1.43.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-12 17:51:13 +03:00
9 changed files with 59 additions and 1027 deletions

View File

@ -1,3 +1,3 @@
package service
//go:generate protoc -I./proto -I. --go-grpc_out=paths=source_relative:./proto --go_out=paths=source_relative:./proto --go-micro_out=components=micro|rpc,standalone=true,debug=true,paths=source_relative:./micro proto/service.proto
//go:generate protoc -I./proto -I. --go_out=paths=source_relative:./proto --go-micro_out=components=micro|rpc,standalone=true,debug=true,paths=source_relative:./micro proto/service.proto

19
go.mod
View File

@ -1,10 +1,21 @@
module go.unistack.org/micro-logger-service/v3
module go.unistack.org/micro-logger-service/v4
go 1.16
go 1.20
require (
github.com/google/uuid v1.3.0
go.unistack.org/micro/v3 v3.10.11
google.golang.org/grpc v1.52.3
go.unistack.org/micro-logger-service/v3 v3.8.1
go.unistack.org/micro-server-http/v4 v4.0.1
go.unistack.org/micro/v4 v4.0.1
google.golang.org/protobuf v1.28.1
)
require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6 // indirect
google.golang.org/grpc v1.52.3 // indirect
)

913
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,7 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.5.3
// versions:
// - protoc-gen-go-micro v4.0.0
// - protoc v3.21.12
// source: service.proto
package servicepb
@ -7,19 +9,16 @@ package servicepb
import (
context "context"
proto "go.unistack.org/micro-logger-service/v3/proto"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
v4 "go.unistack.org/micro-server-http/v4"
client "go.unistack.org/micro/v4/client"
)
var (
LoggerServiceName = "LoggerService"
LoggerServiceEndpoints = []api.Endpoint{}
)
func NewLoggerServiceEndpoints() []api.Endpoint {
return LoggerServiceEndpoints
}
var (
LoggerServiceServerEndpoints = []v4.EndpointMetadata{}
)
type LoggerServiceClient interface {
Log(ctx context.Context, req *proto.LogReq, opts ...client.CallOption) (*proto.LogRsp, error)

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
// protoc-gen-go-micro version: v3.5.3
// protoc-gen-go-micro version: v4.0.0
// source: service.proto
package servicepb
@ -7,9 +7,8 @@ package servicepb
import (
context "context"
proto "go.unistack.org/micro-logger-service/v3/proto"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
server "go.unistack.org/micro/v3/server"
client "go.unistack.org/micro/v4/client"
server "go.unistack.org/micro/v4/server"
)
type loggerServiceClient struct {
@ -47,8 +46,5 @@ func RegisterLoggerServiceServer(s server.Server, sh LoggerServiceServer, opts .
}
h := &loggerServiceServer{sh}
var nopts []server.HandlerOption
for _, endpoint := range LoggerServiceEndpoints {
nopts = append(nopts, api.WithEndpoint(&endpoint))
}
return s.Handle(s.NewHandler(&LoggerService{h}, append(nopts, opts...)...))
}

View File

@ -1,9 +1,9 @@
package service
import (
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/store"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/store"
)
type clientKey struct{}

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.19.4
// protoc v3.21.12
// source: service.proto
package servicepb

View File

@ -1,105 +0,0 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.4
// source: service.proto
package servicepb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// LoggerServiceClient is the client API for LoggerService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type LoggerServiceClient interface {
Log(ctx context.Context, in *LogReq, opts ...grpc.CallOption) (*LogRsp, error)
}
type loggerServiceClient struct {
cc grpc.ClientConnInterface
}
func NewLoggerServiceClient(cc grpc.ClientConnInterface) LoggerServiceClient {
return &loggerServiceClient{cc}
}
func (c *loggerServiceClient) Log(ctx context.Context, in *LogReq, opts ...grpc.CallOption) (*LogRsp, error) {
out := new(LogRsp)
err := c.cc.Invoke(ctx, "/servicepb.LoggerService/Log", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// LoggerServiceServer is the server API for LoggerService service.
// All implementations must embed UnimplementedLoggerServiceServer
// for forward compatibility
type LoggerServiceServer interface {
Log(context.Context, *LogReq) (*LogRsp, error)
mustEmbedUnimplementedLoggerServiceServer()
}
// UnimplementedLoggerServiceServer must be embedded to have forward compatible implementations.
type UnimplementedLoggerServiceServer struct {
}
func (UnimplementedLoggerServiceServer) Log(context.Context, *LogReq) (*LogRsp, error) {
return nil, status.Errorf(codes.Unimplemented, "method Log not implemented")
}
func (UnimplementedLoggerServiceServer) mustEmbedUnimplementedLoggerServiceServer() {}
// UnsafeLoggerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to LoggerServiceServer will
// result in compilation errors.
type UnsafeLoggerServiceServer interface {
mustEmbedUnimplementedLoggerServiceServer()
}
func RegisterLoggerServiceServer(s grpc.ServiceRegistrar, srv LoggerServiceServer) {
s.RegisterService(&LoggerService_ServiceDesc, srv)
}
func _LoggerService_Log_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LogReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LoggerServiceServer).Log(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/servicepb.LoggerService/Log",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LoggerServiceServer).Log(ctx, req.(*LogReq))
}
return interceptor(ctx, in, info, handler)
}
// LoggerService_ServiceDesc is the grpc.ServiceDesc for LoggerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var LoggerService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "servicepb.LoggerService",
HandlerType: (*LoggerServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Log",
Handler: _LoggerService_Log_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service.proto",
}

View File

@ -1,4 +1,4 @@
package service // import "go.unistack.org/micro-logger-service/v3"
package service // import "go.unistack.org/micro-logger-service/v4"
import (
"context"
@ -6,11 +6,11 @@ import (
"os"
"github.com/google/uuid"
pbmicro "go.unistack.org/micro-logger-service/v3/micro"
pb "go.unistack.org/micro-logger-service/v3/proto"
"go.unistack.org/micro/v3/client"
"go.unistack.org/micro/v3/logger"
"go.unistack.org/micro/v3/store"
pbmicro "go.unistack.org/micro-logger-service/v4/micro"
pb "go.unistack.org/micro-logger-service/v4/proto"
"go.unistack.org/micro/v4/client"
"go.unistack.org/micro/v4/logger"
"go.unistack.org/micro/v4/store"
)
var _ logger.Logger = &serviceLogger{}