Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterEtcdHTTPServer(s *http.Server, srv EtcdHTTPServer)
- func RegisterEtcdServer(s grpc.ServiceRegistrar, srv EtcdServer)
- type EtcdClient
- type EtcdGetReply
- type EtcdGetRequest
- type EtcdHTTPClient
- type EtcdHTTPClientImpl
- type EtcdHTTPServer
- type EtcdPutReply
- type EtcdPutRequest
- func (*EtcdPutRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EtcdPutRequest) GetKey() string
- func (x *EtcdPutRequest) GetValue() string
- func (*EtcdPutRequest) ProtoMessage()
- func (x *EtcdPutRequest) ProtoReflect() protoreflect.Message
- func (x *EtcdPutRequest) Reset()
- func (x *EtcdPutRequest) String() string
- type EtcdServer
- type UnimplementedEtcdServer
- type UnsafeEtcdServer
Constants ¶
const ( Etcd_Put_FullMethodName = "/etcd.v1.Etcd/Put" Etcd_Get_FullMethodName = "/etcd.v1.Etcd/Get" )
const OperationEtcdGet = "/etcd.v1.Etcd/Get"
const OperationEtcdPut = "/etcd.v1.Etcd/Put"
Variables ¶
var Etcd_ServiceDesc = grpc.ServiceDesc{ ServiceName: "etcd.v1.Etcd", HandlerType: (*EtcdServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Put", Handler: _Etcd_Put_Handler, }, { MethodName: "Get", Handler: _Etcd_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/etcd/v1/etcd.proto", }
Etcd_ServiceDesc is the grpc.ServiceDesc for Etcd service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_etcd_v1_etcd_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEtcdHTTPServer ¶
func RegisterEtcdHTTPServer(s *http.Server, srv EtcdHTTPServer)
func RegisterEtcdServer ¶
func RegisterEtcdServer(s grpc.ServiceRegistrar, srv EtcdServer)
Types ¶
type EtcdClient ¶
type EtcdClient interface { Put(ctx context.Context, in *EtcdPutRequest, opts ...grpc.CallOption) (*EtcdPutReply, error) Get(ctx context.Context, in *EtcdGetRequest, opts ...grpc.CallOption) (*EtcdGetReply, error) }
EtcdClient is the client API for Etcd 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.
func NewEtcdClient ¶
func NewEtcdClient(cc grpc.ClientConnInterface) EtcdClient
type EtcdGetReply ¶
type EtcdGetReply struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*EtcdGetReply) Descriptor
deprecated
func (*EtcdGetReply) Descriptor() ([]byte, []int)
Deprecated: Use EtcdGetReply.ProtoReflect.Descriptor instead.
func (*EtcdGetReply) GetValue ¶
func (x *EtcdGetReply) GetValue() string
func (*EtcdGetReply) ProtoMessage ¶
func (*EtcdGetReply) ProtoMessage()
func (*EtcdGetReply) ProtoReflect ¶
func (x *EtcdGetReply) ProtoReflect() protoreflect.Message
func (*EtcdGetReply) Reset ¶
func (x *EtcdGetReply) Reset()
func (*EtcdGetReply) String ¶
func (x *EtcdGetReply) String() string
type EtcdGetRequest ¶
type EtcdGetRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*EtcdGetRequest) Descriptor
deprecated
func (*EtcdGetRequest) Descriptor() ([]byte, []int)
Deprecated: Use EtcdGetRequest.ProtoReflect.Descriptor instead.
func (*EtcdGetRequest) GetKey ¶
func (x *EtcdGetRequest) GetKey() string
func (*EtcdGetRequest) ProtoMessage ¶
func (*EtcdGetRequest) ProtoMessage()
func (*EtcdGetRequest) ProtoReflect ¶
func (x *EtcdGetRequest) ProtoReflect() protoreflect.Message
func (*EtcdGetRequest) Reset ¶
func (x *EtcdGetRequest) Reset()
func (*EtcdGetRequest) String ¶
func (x *EtcdGetRequest) String() string
type EtcdHTTPClient ¶
type EtcdHTTPClient interface { Get(ctx context.Context, req *EtcdGetRequest, opts ...http.CallOption) (rsp *EtcdGetReply, err error) Put(ctx context.Context, req *EtcdPutRequest, opts ...http.CallOption) (rsp *EtcdPutReply, err error) }
func NewEtcdHTTPClient ¶
func NewEtcdHTTPClient(client *http.Client) EtcdHTTPClient
type EtcdHTTPClientImpl ¶
type EtcdHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*EtcdHTTPClientImpl) Get ¶
func (c *EtcdHTTPClientImpl) Get(ctx context.Context, in *EtcdGetRequest, opts ...http.CallOption) (*EtcdGetReply, error)
func (*EtcdHTTPClientImpl) Put ¶
func (c *EtcdHTTPClientImpl) Put(ctx context.Context, in *EtcdPutRequest, opts ...http.CallOption) (*EtcdPutReply, error)
type EtcdHTTPServer ¶
type EtcdHTTPServer interface { Get(context.Context, *EtcdGetRequest) (*EtcdGetReply, error) Put(context.Context, *EtcdPutRequest) (*EtcdPutReply, error) }
type EtcdPutReply ¶
type EtcdPutReply struct { Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*EtcdPutReply) Descriptor
deprecated
func (*EtcdPutReply) Descriptor() ([]byte, []int)
Deprecated: Use EtcdPutReply.ProtoReflect.Descriptor instead.
func (*EtcdPutReply) GetValue ¶
func (x *EtcdPutReply) GetValue() bool
func (*EtcdPutReply) ProtoMessage ¶
func (*EtcdPutReply) ProtoMessage()
func (*EtcdPutReply) ProtoReflect ¶
func (x *EtcdPutReply) ProtoReflect() protoreflect.Message
func (*EtcdPutReply) Reset ¶
func (x *EtcdPutReply) Reset()
func (*EtcdPutReply) String ¶
func (x *EtcdPutReply) String() string
type EtcdPutRequest ¶
type EtcdPutRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*EtcdPutRequest) Descriptor
deprecated
func (*EtcdPutRequest) Descriptor() ([]byte, []int)
Deprecated: Use EtcdPutRequest.ProtoReflect.Descriptor instead.
func (*EtcdPutRequest) GetKey ¶
func (x *EtcdPutRequest) GetKey() string
func (*EtcdPutRequest) GetValue ¶
func (x *EtcdPutRequest) GetValue() string
func (*EtcdPutRequest) ProtoMessage ¶
func (*EtcdPutRequest) ProtoMessage()
func (*EtcdPutRequest) ProtoReflect ¶
func (x *EtcdPutRequest) ProtoReflect() protoreflect.Message
func (*EtcdPutRequest) Reset ¶
func (x *EtcdPutRequest) Reset()
func (*EtcdPutRequest) String ¶
func (x *EtcdPutRequest) String() string
type EtcdServer ¶
type EtcdServer interface { Put(context.Context, *EtcdPutRequest) (*EtcdPutReply, error) Get(context.Context, *EtcdGetRequest) (*EtcdGetReply, error) // contains filtered or unexported methods }
EtcdServer is the server API for Etcd service. All implementations must embed UnimplementedEtcdServer for forward compatibility
type UnimplementedEtcdServer ¶
type UnimplementedEtcdServer struct { }
UnimplementedEtcdServer must be embedded to have forward compatible implementations.
func (UnimplementedEtcdServer) Get ¶
func (UnimplementedEtcdServer) Get(context.Context, *EtcdGetRequest) (*EtcdGetReply, error)
func (UnimplementedEtcdServer) Put ¶
func (UnimplementedEtcdServer) Put(context.Context, *EtcdPutRequest) (*EtcdPutReply, error)
type UnsafeEtcdServer ¶
type UnsafeEtcdServer interface {
// contains filtered or unexported methods
}
UnsafeEtcdServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EtcdServer will result in compilation errors.