pbstorage

package
v1.16.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LogType_name = map[int32]string{
		0: "LOG_TYPE_UNSPECIFIED",
		1: "LOG_TYPE_WRITE",
		2: "LOG_TYPE_DELETE",
	}
	LogType_value = map[string]int32{
		"LOG_TYPE_UNSPECIFIED": 0,
		"LOG_TYPE_WRITE":       1,
		"LOG_TYPE_DELETE":      2,
	}
)

Enum value maps for LogType.

View Source
var File_private_pbstorage_raft_proto protoreflect.FileDescriptor
View Source
var ForwardingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "hashicorp.consul.internal.storage.raft.ForwardingService",
	HandlerType: (*ForwardingServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Write",
			Handler:    _ForwardingService_Write_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _ForwardingService_Delete_Handler,
		},
		{
			MethodName: "Read",
			Handler:    _ForwardingService_Read_Handler,
		},
		{
			MethodName: "List",
			Handler:    _ForwardingService_List_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "private/pbstorage/raft.proto",
}

ForwardingService_ServiceDesc is the grpc.ServiceDesc for ForwardingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterForwardingServiceServer

func RegisterForwardingServiceServer(s grpc.ServiceRegistrar, srv ForwardingServiceServer)

Types

type DeleteRequest

type DeleteRequest struct {
	Id      *pbresource.ID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Version string         `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

DeleteRequest contains the parameters for a write operation.

func (*DeleteRequest) Descriptor deprecated

func (*DeleteRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetId

func (x *DeleteRequest) GetId() *pbresource.ID

func (*DeleteRequest) GetVersion

func (x *DeleteRequest) GetVersion() string

func (*DeleteRequest) MarshalBinary

func (msg *DeleteRequest) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

func (x *DeleteRequest) ProtoReflect() protoreflect.Message

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

func (*DeleteRequest) UnmarshalBinary

func (msg *DeleteRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ForwardingServiceClient

type ForwardingServiceClient interface {
	// Write handles a forwarded write operation.
	Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
	// Delete handles a forwarded delete operation.
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Read handles a forwarded read operation.
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
	// List handles a forwarded list operation.
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
}

ForwardingServiceClient is the client API for ForwardingService 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 ForwardingServiceServer

type ForwardingServiceServer interface {
	// Write handles a forwarded write operation.
	Write(context.Context, *WriteRequest) (*WriteResponse, error)
	// Delete handles a forwarded delete operation.
	Delete(context.Context, *DeleteRequest) (*emptypb.Empty, error)
	// Read handles a forwarded read operation.
	Read(context.Context, *ReadRequest) (*ReadResponse, error)
	// List handles a forwarded list operation.
	List(context.Context, *ListRequest) (*ListResponse, error)
}

ForwardingServiceServer is the server API for ForwardingService service. All implementations should embed UnimplementedForwardingServiceServer for forward compatibility

type GroupVersionMismatchErrorDetails

type GroupVersionMismatchErrorDetails struct {
	RequestedType *pbresource.Type     `protobuf:"bytes,1,opt,name=requested_type,json=requestedType,proto3" json:"requested_type,omitempty"`
	Stored        *pbresource.Resource `protobuf:"bytes,2,opt,name=stored,proto3" json:"stored,omitempty"`
	// contains filtered or unexported fields
}

GroupVersionMismatchErrorDetails contains the error details that will be returned when the leader encounters a storage.GroupVersionMismatchError.

func (*GroupVersionMismatchErrorDetails) Descriptor deprecated

func (*GroupVersionMismatchErrorDetails) Descriptor() ([]byte, []int)

Deprecated: Use GroupVersionMismatchErrorDetails.ProtoReflect.Descriptor instead.

func (*GroupVersionMismatchErrorDetails) GetRequestedType

func (x *GroupVersionMismatchErrorDetails) GetRequestedType() *pbresource.Type

func (*GroupVersionMismatchErrorDetails) GetStored

func (*GroupVersionMismatchErrorDetails) MarshalBinary

func (msg *GroupVersionMismatchErrorDetails) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*GroupVersionMismatchErrorDetails) ProtoMessage

func (*GroupVersionMismatchErrorDetails) ProtoMessage()

func (*GroupVersionMismatchErrorDetails) ProtoReflect

func (*GroupVersionMismatchErrorDetails) Reset

func (*GroupVersionMismatchErrorDetails) String

func (*GroupVersionMismatchErrorDetails) UnmarshalBinary

func (msg *GroupVersionMismatchErrorDetails) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ListRequest

type ListRequest struct {
	Type       *pbresource.Type    `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Tenancy    *pbresource.Tenancy `protobuf:"bytes,2,opt,name=tenancy,proto3" json:"tenancy,omitempty"`
	NamePrefix string              `protobuf:"bytes,3,opt,name=name_prefix,json=namePrefix,proto3" json:"name_prefix,omitempty"`
	// contains filtered or unexported fields
}

ListRequest contains the parameters for a consistent list operation.

func (*ListRequest) Descriptor deprecated

func (*ListRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetNamePrefix

func (x *ListRequest) GetNamePrefix() string

func (*ListRequest) GetTenancy

func (x *ListRequest) GetTenancy() *pbresource.Tenancy

func (*ListRequest) GetType

func (x *ListRequest) GetType() *pbresource.Type

func (*ListRequest) MarshalBinary

func (msg *ListRequest) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

func (*ListRequest) UnmarshalBinary

func (msg *ListRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ListResponse

type ListResponse struct {
	Resources []*pbresource.Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
	// contains filtered or unexported fields
}

ListResponse contains the results of a consistent list operation.

func (*ListResponse) Descriptor deprecated

func (*ListResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetResources

func (x *ListResponse) GetResources() []*pbresource.Resource

func (*ListResponse) MarshalBinary

func (msg *ListResponse) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

func (*ListResponse) UnmarshalBinary

func (msg *ListResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type Log

type Log struct {
	Type LogType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.consul.internal.storage.raft.LogType" json:"type,omitempty"`
	// Types that are assignable to Request:
	//
	//	*Log_Write
	//	*Log_Delete
	Request isLog_Request `protobuf_oneof:"request"`
	// contains filtered or unexported fields
}

Log is protobuf-encoded and written to the Raft log.

func (*Log) Descriptor deprecated

func (*Log) Descriptor() ([]byte, []int)

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetDelete

func (x *Log) GetDelete() *DeleteRequest

func (*Log) GetRequest

func (m *Log) GetRequest() isLog_Request

func (*Log) GetType

func (x *Log) GetType() LogType

func (*Log) GetWrite

func (x *Log) GetWrite() *WriteRequest

func (*Log) MarshalBinary

func (msg *Log) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

func (x *Log) ProtoReflect() protoreflect.Message

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

func (*Log) UnmarshalBinary

func (msg *Log) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type LogResponse

type LogResponse struct {

	// Types that are assignable to Response:
	//
	//	*LogResponse_Write
	//	*LogResponse_Delete
	Response isLogResponse_Response `protobuf_oneof:"response"`
	// contains filtered or unexported fields
}

LogResponse contains the FSM's response to applying a log.

func (*LogResponse) Descriptor deprecated

func (*LogResponse) Descriptor() ([]byte, []int)

Deprecated: Use LogResponse.ProtoReflect.Descriptor instead.

func (*LogResponse) GetDelete

func (x *LogResponse) GetDelete() *emptypb.Empty

func (*LogResponse) GetResponse

func (m *LogResponse) GetResponse() isLogResponse_Response

func (*LogResponse) GetWrite

func (x *LogResponse) GetWrite() *WriteResponse

func (*LogResponse) MarshalBinary

func (msg *LogResponse) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*LogResponse) ProtoMessage

func (*LogResponse) ProtoMessage()

func (*LogResponse) ProtoReflect

func (x *LogResponse) ProtoReflect() protoreflect.Message

func (*LogResponse) Reset

func (x *LogResponse) Reset()

func (*LogResponse) String

func (x *LogResponse) String() string

func (*LogResponse) UnmarshalBinary

func (msg *LogResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type LogResponse_Delete

type LogResponse_Delete struct {
	Delete *emptypb.Empty `protobuf:"bytes,2,opt,name=delete,proto3,oneof"`
}

type LogResponse_Write

type LogResponse_Write struct {
	Write *WriteResponse `protobuf:"bytes,1,opt,name=write,proto3,oneof"`
}

type LogType

type LogType int32

LogType describes the type of operation being written to the Raft log.

const (
	LogType_LOG_TYPE_UNSPECIFIED LogType = 0
	LogType_LOG_TYPE_WRITE       LogType = 1
	LogType_LOG_TYPE_DELETE      LogType = 2
)

func (LogType) Descriptor

func (LogType) Descriptor() protoreflect.EnumDescriptor

func (LogType) Enum

func (x LogType) Enum() *LogType

func (LogType) EnumDescriptor deprecated

func (LogType) EnumDescriptor() ([]byte, []int)

Deprecated: Use LogType.Descriptor instead.

func (LogType) Number

func (x LogType) Number() protoreflect.EnumNumber

func (LogType) String

func (x LogType) String() string

func (LogType) Type

func (LogType) Type() protoreflect.EnumType

type Log_Delete

type Log_Delete struct {
	Delete *DeleteRequest `protobuf:"bytes,3,opt,name=delete,proto3,oneof"`
}

type Log_Write

type Log_Write struct {
	Write *WriteRequest `protobuf:"bytes,2,opt,name=write,proto3,oneof"`
}

type ReadRequest

type ReadRequest struct {
	Id *pbresource.ID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

ReadRequest contains the parameters for a consistent read operation.

func (*ReadRequest) Descriptor deprecated

func (*ReadRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.

func (*ReadRequest) GetId

func (x *ReadRequest) GetId() *pbresource.ID

func (*ReadRequest) MarshalBinary

func (msg *ReadRequest) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) ProtoReflect

func (x *ReadRequest) ProtoReflect() protoreflect.Message

func (*ReadRequest) Reset

func (x *ReadRequest) Reset()

func (*ReadRequest) String

func (x *ReadRequest) String() string

func (*ReadRequest) UnmarshalBinary

func (msg *ReadRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ReadResponse

type ReadResponse struct {
	Resource *pbresource.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

ReadResponse contains the results of a consistent read operation.

func (*ReadResponse) Descriptor deprecated

func (*ReadResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.

func (*ReadResponse) GetResource

func (x *ReadResponse) GetResource() *pbresource.Resource

func (*ReadResponse) MarshalBinary

func (msg *ReadResponse) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) ProtoReflect

func (x *ReadResponse) ProtoReflect() protoreflect.Message

func (*ReadResponse) Reset

func (x *ReadResponse) Reset()

func (*ReadResponse) String

func (x *ReadResponse) String() string

func (*ReadResponse) UnmarshalBinary

func (msg *ReadResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type UnimplementedForwardingServiceServer

type UnimplementedForwardingServiceServer struct {
}

UnimplementedForwardingServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedForwardingServiceServer) Delete

func (UnimplementedForwardingServiceServer) List

func (UnimplementedForwardingServiceServer) Read

func (UnimplementedForwardingServiceServer) Write

type UnsafeForwardingServiceServer

type UnsafeForwardingServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeForwardingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ForwardingServiceServer will result in compilation errors.

type WriteRequest

type WriteRequest struct {
	Resource *pbresource.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

WriteRequest contains the parameters for a write operation.

func (*WriteRequest) Descriptor deprecated

func (*WriteRequest) Descriptor() ([]byte, []int)

Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.

func (*WriteRequest) GetResource

func (x *WriteRequest) GetResource() *pbresource.Resource

func (*WriteRequest) MarshalBinary

func (msg *WriteRequest) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) ProtoReflect

func (x *WriteRequest) ProtoReflect() protoreflect.Message

func (*WriteRequest) Reset

func (x *WriteRequest) Reset()

func (*WriteRequest) String

func (x *WriteRequest) String() string

func (*WriteRequest) UnmarshalBinary

func (msg *WriteRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type WriteResponse

type WriteResponse struct {
	Resource *pbresource.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

WriteResponse contains the results of a write operation.

func (*WriteResponse) Descriptor deprecated

func (*WriteResponse) Descriptor() ([]byte, []int)

Deprecated: Use WriteResponse.ProtoReflect.Descriptor instead.

func (*WriteResponse) GetResource

func (x *WriteResponse) GetResource() *pbresource.Resource

func (*WriteResponse) MarshalBinary

func (msg *WriteResponse) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*WriteResponse) ProtoMessage

func (*WriteResponse) ProtoMessage()

func (*WriteResponse) ProtoReflect

func (x *WriteResponse) ProtoReflect() protoreflect.Message

func (*WriteResponse) Reset

func (x *WriteResponse) Reset()

func (*WriteResponse) String

func (x *WriteResponse) String() string

func (*WriteResponse) UnmarshalBinary

func (msg *WriteResponse) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

Jump to

Keyboard shortcuts

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