4010e25ea0
* chore: add meta config rpc Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: update payload to simple string Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: wrap string with message to enable option in rust Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: replace content with vec Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: fix format Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: remove repeated Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: update comment Co-authored-by: fys <40801205+fengys1996@users.noreply.github.com> * chore: update comment Signed-off-by: shuiyisong <xixing.sys@gmail.com> * chore: move pull config to a separate config service Signed-off-by: shuiyisong <xixing.sys@gmail.com> --------- Signed-off-by: shuiyisong <xixing.sys@gmail.com> Co-authored-by: fys <40801205+fengys1996@users.noreply.github.com>
108 lines
3.6 KiB
Go
108 lines
3.6 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.21.6
|
|
// source: greptime/v1/meta/config.proto
|
|
|
|
package meta
|
|
|
|
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
|
|
|
|
// ConfigClient is the client API for Config 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 ConfigClient interface {
|
|
// Pull configuration from meta server.
|
|
PullConfig(ctx context.Context, in *PullConfigRequest, opts ...grpc.CallOption) (*PullConfigResponse, error)
|
|
}
|
|
|
|
type configClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient {
|
|
return &configClient{cc}
|
|
}
|
|
|
|
func (c *configClient) PullConfig(ctx context.Context, in *PullConfigRequest, opts ...grpc.CallOption) (*PullConfigResponse, error) {
|
|
out := new(PullConfigResponse)
|
|
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Config/PullConfig", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ConfigServer is the server API for Config service.
|
|
// All implementations must embed UnimplementedConfigServer
|
|
// for forward compatibility
|
|
type ConfigServer interface {
|
|
// Pull configuration from meta server.
|
|
PullConfig(context.Context, *PullConfigRequest) (*PullConfigResponse, error)
|
|
mustEmbedUnimplementedConfigServer()
|
|
}
|
|
|
|
// UnimplementedConfigServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedConfigServer struct {
|
|
}
|
|
|
|
func (UnimplementedConfigServer) PullConfig(context.Context, *PullConfigRequest) (*PullConfigResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method PullConfig not implemented")
|
|
}
|
|
func (UnimplementedConfigServer) mustEmbedUnimplementedConfigServer() {}
|
|
|
|
// UnsafeConfigServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ConfigServer will
|
|
// result in compilation errors.
|
|
type UnsafeConfigServer interface {
|
|
mustEmbedUnimplementedConfigServer()
|
|
}
|
|
|
|
func RegisterConfigServer(s grpc.ServiceRegistrar, srv ConfigServer) {
|
|
s.RegisterService(&Config_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Config_PullConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(PullConfigRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ConfigServer).PullConfig(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/greptime.v1.meta.Config/PullConfig",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ConfigServer).PullConfig(ctx, req.(*PullConfigRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Config_ServiceDesc is the grpc.ServiceDesc for Config service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Config_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "greptime.v1.meta.Config",
|
|
HandlerType: (*ConfigServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "PullConfig",
|
|
Handler: _Config_PullConfig_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "greptime/v1/meta/config.proto",
|
|
}
|