pboperator

package
v1.16.109 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2023 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_private_pboperator_operator_proto protoreflect.FileDescriptor
View Source
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.

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL