82466d587d
iotlcm-upstream-proxy:渠道缓存与转发网关。 - 内联原私有依赖:yunze-public → internal/pub/(18 文件), yunze-pb/pb → internal/pb/(9 文件);Consul 注册改用官方 gogf/gf/contrib/registry/consul/v2(API 兼容) - Go module:yz-svr → git.5iot.com/iotlcm-public/iotlcm-upstream-proxy - 凭据与内部标识脱敏:MySQL/Redis/Consul 凭据、私网与生产 IP、内网域名 - 移除内部资产:CI 触发器 - Dockerfile 改用公共基础镜像,移除写死的 registry 凭据 - 补 Apache-2.0 LICENSE,重写 README,LF 行尾 + .gitattributes
123 lines
3.9 KiB
Go
123 lines
3.9 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.1
|
|
// - protoc v5.29.3
|
|
// source: info.proto
|
|
|
|
package pb
|
|
|
|
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.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
Info_Info_FullMethodName = "/PbInfo.Info/Info"
|
|
)
|
|
|
|
// InfoClient is the client API for Info 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 InfoClient interface {
|
|
Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoRes, error)
|
|
}
|
|
|
|
type infoClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewInfoClient(cc grpc.ClientConnInterface) InfoClient {
|
|
return &infoClient{cc}
|
|
}
|
|
|
|
func (c *infoClient) Info(ctx context.Context, in *InfoReq, opts ...grpc.CallOption) (*InfoRes, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(InfoRes)
|
|
err := c.cc.Invoke(ctx, Info_Info_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// InfoServer is the server API for Info service.
|
|
// All implementations must embed UnimplementedInfoServer
|
|
// for forward compatibility.
|
|
type InfoServer interface {
|
|
Info(context.Context, *InfoReq) (*InfoRes, error)
|
|
mustEmbedUnimplementedInfoServer()
|
|
}
|
|
|
|
// UnimplementedInfoServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedInfoServer struct{}
|
|
|
|
func (UnimplementedInfoServer) Info(context.Context, *InfoReq) (*InfoRes, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Info not implemented")
|
|
}
|
|
func (UnimplementedInfoServer) mustEmbedUnimplementedInfoServer() {}
|
|
func (UnimplementedInfoServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeInfoServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to InfoServer will
|
|
// result in compilation errors.
|
|
type UnsafeInfoServer interface {
|
|
mustEmbedUnimplementedInfoServer()
|
|
}
|
|
|
|
func RegisterInfoServer(s grpc.ServiceRegistrar, srv InfoServer) {
|
|
// If the following call panics, it indicates UnimplementedInfoServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&Info_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Info_Info_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(InfoReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(InfoServer).Info(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Info_Info_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(InfoServer).Info(ctx, req.(*InfoReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Info_ServiceDesc is the grpc.ServiceDesc for Info service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Info_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "PbInfo.Info",
|
|
HandlerType: (*InfoServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Info",
|
|
Handler: _Info_Info_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "info.proto",
|
|
}
|