Vasiliy Tolstov
3cd27c71d9
* 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> * 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> * 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> * 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> * 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> * 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> * 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> * 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> * 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> * 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> * 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> * 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> * update workflows Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * Update pr.yml * update go version Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * complete logger service Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
55 lines
1.5 KiB
Go
55 lines
1.5 KiB
Go
// Code generated by protoc-gen-go-micro. DO NOT EDIT.
|
|
// protoc-gen-go-micro version: v3.5.3
|
|
// source: service.proto
|
|
|
|
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"
|
|
)
|
|
|
|
type loggerServiceClient struct {
|
|
c client.Client
|
|
name string
|
|
}
|
|
|
|
func NewLoggerServiceClient(name string, c client.Client) LoggerServiceClient {
|
|
return &loggerServiceClient{c: c, name: name}
|
|
}
|
|
|
|
func (c *loggerServiceClient) Log(ctx context.Context, req *proto.LogReq, opts ...client.CallOption) (*proto.LogRsp, error) {
|
|
rsp := &proto.LogRsp{}
|
|
err := c.c.Call(ctx, c.c.NewRequest(c.name, "LoggerService.Log", req), rsp, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return rsp, nil
|
|
}
|
|
|
|
type loggerServiceServer struct {
|
|
LoggerServiceServer
|
|
}
|
|
|
|
func (h *loggerServiceServer) Log(ctx context.Context, req *proto.LogReq, rsp *proto.LogRsp) error {
|
|
return h.LoggerServiceServer.Log(ctx, req, rsp)
|
|
}
|
|
|
|
func RegisterLoggerServiceServer(s server.Server, sh LoggerServiceServer, opts ...server.HandlerOption) error {
|
|
type loggerService interface {
|
|
Log(ctx context.Context, req *proto.LogReq, rsp *proto.LogRsp) error
|
|
}
|
|
type LoggerService struct {
|
|
loggerService
|
|
}
|
|
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...)...))
|
|
}
|