Documentation ¶
Index ¶
- Variables
- func RegisterOperatorServiceServer(s grpc.ServiceRegistrar, srv OperatorServiceServer)
- func TransferLeaderResponseFromAPI(t *api.TransferLeaderResponse, s *TransferLeaderResponse)
- func TransferLeaderResponseToAPI(s *TransferLeaderResponse, t *api.TransferLeaderResponse)
- type OperatorServiceClient
- type OperatorServiceServer
- type TransferLeaderRequest
- func (*TransferLeaderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TransferLeaderRequest) GetID() string
- func (msg *TransferLeaderRequest) MarshalBinary() ([]byte, error)
- func (*TransferLeaderRequest) ProtoMessage()
- func (x *TransferLeaderRequest) ProtoReflect() protoreflect.Message
- func (x *TransferLeaderRequest) Reset()
- func (x *TransferLeaderRequest) String() string
- func (msg *TransferLeaderRequest) UnmarshalBinary(b []byte) error
- type TransferLeaderResponse
- func (*TransferLeaderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *TransferLeaderResponse) GetSuccess() bool
- func (msg *TransferLeaderResponse) MarshalBinary() ([]byte, error)
- func (*TransferLeaderResponse) ProtoMessage()
- func (x *TransferLeaderResponse) ProtoReflect() protoreflect.Message
- func (x *TransferLeaderResponse) Reset()
- func (x *TransferLeaderResponse) String() string
- func (msg *TransferLeaderResponse) UnmarshalBinary(b []byte) error
- type UnimplementedOperatorServiceServer
- type UnsafeOperatorServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_private_pboperator_operator_proto protoreflect.FileDescriptor
var OperatorService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hashicorp.consul.internal.operator.OperatorService", HandlerType: (*OperatorServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TransferLeader", Handler: _OperatorService_TransferLeader_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "private/pboperator/operator.proto", }
OperatorService_ServiceDesc is the grpc.ServiceDesc for OperatorService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOperatorServiceServer ¶
func RegisterOperatorServiceServer(s grpc.ServiceRegistrar, srv OperatorServiceServer)
func TransferLeaderResponseFromAPI ¶
func TransferLeaderResponseFromAPI(t *api.TransferLeaderResponse, s *TransferLeaderResponse)
func TransferLeaderResponseToAPI ¶
func TransferLeaderResponseToAPI(s *TransferLeaderResponse, t *api.TransferLeaderResponse)
Types ¶
type OperatorServiceClient ¶
type OperatorServiceClient interface { // Transfer raft leadership to another node TransferLeader(ctx context.Context, in *TransferLeaderRequest, opts ...grpc.CallOption) (*TransferLeaderResponse, error) }
OperatorServiceClient is the client API for OperatorService 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 NewOperatorServiceClient ¶
func NewOperatorServiceClient(cc grpc.ClientConnInterface) OperatorServiceClient
type OperatorServiceServer ¶
type OperatorServiceServer interface { // Transfer raft leadership to another node TransferLeader(context.Context, *TransferLeaderRequest) (*TransferLeaderResponse, error) }
OperatorServiceServer is the server API for OperatorService service. All implementations should embed UnimplementedOperatorServiceServer for forward compatibility
type TransferLeaderRequest ¶
type TransferLeaderRequest struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` // contains filtered or unexported fields }
func (*TransferLeaderRequest) Descriptor
deprecated
func (*TransferLeaderRequest) Descriptor() ([]byte, []int)
Deprecated: Use TransferLeaderRequest.ProtoReflect.Descriptor instead.
func (*TransferLeaderRequest) GetID ¶
func (x *TransferLeaderRequest) GetID() string
func (*TransferLeaderRequest) MarshalBinary ¶
func (msg *TransferLeaderRequest) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler
func (*TransferLeaderRequest) ProtoMessage ¶
func (*TransferLeaderRequest) ProtoMessage()
func (*TransferLeaderRequest) ProtoReflect ¶
func (x *TransferLeaderRequest) ProtoReflect() protoreflect.Message
func (*TransferLeaderRequest) Reset ¶
func (x *TransferLeaderRequest) Reset()
func (*TransferLeaderRequest) String ¶
func (x *TransferLeaderRequest) String() string
func (*TransferLeaderRequest) UnmarshalBinary ¶
func (msg *TransferLeaderRequest) UnmarshalBinary(b []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler
type TransferLeaderResponse ¶
type TransferLeaderResponse struct { // true if the transfer is a success Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
mog annotation:
target=github.com/hernad/consul/api.TransferLeaderResponse output=operator.gen.go name=API
func (*TransferLeaderResponse) Descriptor
deprecated
func (*TransferLeaderResponse) Descriptor() ([]byte, []int)
Deprecated: Use TransferLeaderResponse.ProtoReflect.Descriptor instead.
func (*TransferLeaderResponse) GetSuccess ¶
func (x *TransferLeaderResponse) GetSuccess() bool
func (*TransferLeaderResponse) MarshalBinary ¶
func (msg *TransferLeaderResponse) MarshalBinary() ([]byte, error)
MarshalBinary implements encoding.BinaryMarshaler
func (*TransferLeaderResponse) ProtoMessage ¶
func (*TransferLeaderResponse) ProtoMessage()
func (*TransferLeaderResponse) ProtoReflect ¶
func (x *TransferLeaderResponse) ProtoReflect() protoreflect.Message
func (*TransferLeaderResponse) Reset ¶
func (x *TransferLeaderResponse) Reset()
func (*TransferLeaderResponse) String ¶
func (x *TransferLeaderResponse) String() string
func (*TransferLeaderResponse) UnmarshalBinary ¶
func (msg *TransferLeaderResponse) UnmarshalBinary(b []byte) error
UnmarshalBinary implements encoding.BinaryUnmarshaler
type UnimplementedOperatorServiceServer ¶
type UnimplementedOperatorServiceServer struct { }
UnimplementedOperatorServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedOperatorServiceServer) TransferLeader ¶
func (UnimplementedOperatorServiceServer) TransferLeader(context.Context, *TransferLeaderRequest) (*TransferLeaderResponse, error)
type UnsafeOperatorServiceServer ¶
type UnsafeOperatorServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOperatorServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OperatorServiceServer will result in compilation errors.