qualia

package
v0.0.0-...-027155e Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Txn_Type_name = map[int32]string{
		0: "FREE",
		1: "BLOCKED",
	}
	Txn_Type_value = map[string]int32{
		"FREE":    0,
		"BLOCKED": 1,
	}
)

Enum value maps for Txn_Type.

View Source
var CacheService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "qualia.CacheService",
	HandlerType: (*CacheServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _CacheService_Get_Handler,
		},
		{
			MethodName: "Set",
			Handler:    _CacheService_Set_Handler,
		},
		{
			MethodName: "Del",
			Handler:    _CacheService_Del_Handler,
		},
		{
			MethodName: "Scan",
			Handler:    _CacheService_Scan_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "qualia/cache.proto",
}

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

View Source
var File_qualia_cache_proto protoreflect.FileDescriptor
View Source
var File_qualia_lookup_proto protoreflect.FileDescriptor
View Source
var File_qualia_txn_proto protoreflect.FileDescriptor
View Source
var LookupService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "qualia.LookupService",
	HandlerType: (*LookupServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Lookup",
			Handler:    _LookupService_Lookup_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "qualia/lookup.proto",
}

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

View Source
var QualiaService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "qualia.QualiaService",
	HandlerType: (*QualiaServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ReceiveNewTxn",
			Handler:    _QualiaService_ReceiveNewTxn_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "qualia/txn.proto",
}

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

Functions

func RegisterCacheServiceServer

func RegisterCacheServiceServer(s grpc.ServiceRegistrar, srv CacheServiceServer)

func RegisterLookupServiceServer

func RegisterLookupServiceServer(s grpc.ServiceRegistrar, srv LookupServiceServer)

func RegisterQualiaServiceServer

func RegisterQualiaServiceServer(s grpc.ServiceRegistrar, srv QualiaServiceServer)

Types

type CacheServiceClient

type CacheServiceClient interface {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Set(ctx context.Context, in *SetRequest, opts ...grpc.CallOption) (*SetResponse, error)
	Del(ctx context.Context, in *DelRequest, opts ...grpc.CallOption) (*DelResponse, error)
	Scan(ctx context.Context, in *ScanRequest, opts ...grpc.CallOption) (*ScanResponse, error)
}

CacheServiceClient is the client API for CacheService 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 CacheServiceServer

type CacheServiceServer interface {
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Set(context.Context, *SetRequest) (*SetResponse, error)
	Del(context.Context, *DelRequest) (*DelResponse, error)
	Scan(context.Context, *ScanRequest) (*ScanResponse, error)
	// contains filtered or unexported methods
}

CacheServiceServer is the server API for CacheService service. All implementations must embed UnimplementedCacheServiceServer for forward compatibility

type DelRequest

type DelRequest struct {
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*DelRequest) Descriptor deprecated

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

Deprecated: Use DelRequest.ProtoReflect.Descriptor instead.

func (*DelRequest) GetKey

func (x *DelRequest) GetKey() []byte

func (*DelRequest) ProtoMessage

func (*DelRequest) ProtoMessage()

func (*DelRequest) ProtoReflect

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

func (*DelRequest) Reset

func (x *DelRequest) Reset()

func (*DelRequest) String

func (x *DelRequest) String() string

type DelResponse

type DelResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*DelResponse) Descriptor deprecated

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

Deprecated: Use DelResponse.ProtoReflect.Descriptor instead.

func (*DelResponse) GetStatus

func (x *DelResponse) GetStatus() string

func (*DelResponse) ProtoMessage

func (*DelResponse) ProtoMessage()

func (*DelResponse) ProtoReflect

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

func (*DelResponse) Reset

func (x *DelResponse) Reset()

func (*DelResponse) String

func (x *DelResponse) String() string

type GetRequest

type GetRequest struct {
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetKey

func (x *GetRequest) GetKey() []byte

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Status string    `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Value  *KeyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetStatus

func (x *GetResponse) GetStatus() string

func (*GetResponse) GetValue

func (x *GetResponse) GetValue() *KeyValue

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type KeyEntry

type KeyEntry struct {
	Key     []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Master  uint32 `protobuf:"varint,2,opt,name=master,proto3" json:"master,omitempty"`
	Counter uint64 `protobuf:"varint,3,opt,name=counter,proto3" json:"counter,omitempty"`
	// contains filtered or unexported fields
}

Key-Value

func (*KeyEntry) Descriptor deprecated

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

Deprecated: Use KeyEntry.ProtoReflect.Descriptor instead.

func (*KeyEntry) GetCounter

func (x *KeyEntry) GetCounter() uint64

func (*KeyEntry) GetKey

func (x *KeyEntry) GetKey() []byte

func (*KeyEntry) GetMaster

func (x *KeyEntry) GetMaster() uint32

func (*KeyEntry) ProtoMessage

func (*KeyEntry) ProtoMessage()

func (*KeyEntry) ProtoReflect

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

func (*KeyEntry) Reset

func (x *KeyEntry) Reset()

func (*KeyEntry) String

func (x *KeyEntry) String() string

type KeyValue

type KeyValue struct {
	Key   []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*KeyValue) Descriptor deprecated

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

Deprecated: Use KeyValue.ProtoReflect.Descriptor instead.

func (*KeyValue) GetKey

func (x *KeyValue) GetKey() []byte

func (*KeyValue) GetValue

func (x *KeyValue) GetValue() []byte

func (*KeyValue) ProtoMessage

func (*KeyValue) ProtoMessage()

func (*KeyValue) ProtoReflect

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

func (*KeyValue) Reset

func (x *KeyValue) Reset()

func (*KeyValue) String

func (x *KeyValue) String() string

type LookupRequest

type LookupRequest struct {
	TxnId uint64   `protobuf:"varint,1,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"`
	Keys  [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*LookupRequest) Descriptor deprecated

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

Deprecated: Use LookupRequest.ProtoReflect.Descriptor instead.

func (*LookupRequest) GetKeys

func (x *LookupRequest) GetKeys() [][]byte

func (*LookupRequest) GetTxnId

func (x *LookupRequest) GetTxnId() uint64

func (*LookupRequest) ProtoMessage

func (*LookupRequest) ProtoMessage()

func (*LookupRequest) ProtoReflect

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

func (*LookupRequest) Reset

func (x *LookupRequest) Reset()

func (*LookupRequest) String

func (x *LookupRequest) String() string

type LookupResponse

type LookupResponse struct {
	TxnId      uint64      `protobuf:"varint,1,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"`
	KeyEntries []*KeyEntry `protobuf:"bytes,2,rep,name=key_entries,json=keyEntries,proto3" json:"key_entries,omitempty"`
	// contains filtered or unexported fields
}

func (*LookupResponse) Descriptor deprecated

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

Deprecated: Use LookupResponse.ProtoReflect.Descriptor instead.

func (*LookupResponse) GetKeyEntries

func (x *LookupResponse) GetKeyEntries() []*KeyEntry

func (*LookupResponse) GetTxnId

func (x *LookupResponse) GetTxnId() uint64

func (*LookupResponse) ProtoMessage

func (*LookupResponse) ProtoMessage()

func (*LookupResponse) ProtoReflect

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

func (*LookupResponse) Reset

func (x *LookupResponse) Reset()

func (*LookupResponse) String

func (x *LookupResponse) String() string

type LookupServiceClient

type LookupServiceClient interface {
	Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error)
}

LookupServiceClient is the client API for LookupService 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 LookupServiceServer

type LookupServiceServer interface {
	Lookup(context.Context, *LookupRequest) (*LookupResponse, error)
	// contains filtered or unexported methods
}

LookupServiceServer is the server API for LookupService service. All implementations must embed UnimplementedLookupServiceServer for forward compatibility

type QualiaServiceClient

type QualiaServiceClient interface {
	ReceiveNewTxn(ctx context.Context, in *Txn, opts ...grpc.CallOption) (*TxnResponse, error)
}

QualiaServiceClient is the client API for QualiaService 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 QualiaServiceServer

type QualiaServiceServer interface {
	ReceiveNewTxn(context.Context, *Txn) (*TxnResponse, error)
	// contains filtered or unexported methods
}

QualiaServiceServer is the server API for QualiaService service. All implementations must embed UnimplementedQualiaServiceServer for forward compatibility

type ScanRequest

type ScanRequest struct {
	StartKey []byte `protobuf:"bytes,1,opt,name=start_key,json=startKey,proto3" json:"start_key,omitempty"`
	EndKey   []byte `protobuf:"bytes,2,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"`
	Limit    uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

func (*ScanRequest) Descriptor deprecated

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

Deprecated: Use ScanRequest.ProtoReflect.Descriptor instead.

func (*ScanRequest) GetEndKey

func (x *ScanRequest) GetEndKey() []byte

func (*ScanRequest) GetLimit

func (x *ScanRequest) GetLimit() uint32

func (*ScanRequest) GetStartKey

func (x *ScanRequest) GetStartKey() []byte

func (*ScanRequest) ProtoMessage

func (*ScanRequest) ProtoMessage()

func (*ScanRequest) ProtoReflect

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

func (*ScanRequest) Reset

func (x *ScanRequest) Reset()

func (*ScanRequest) String

func (x *ScanRequest) String() string

type ScanResponse

type ScanResponse struct {
	Rows []*KeyValue `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
	// contains filtered or unexported fields
}

func (*ScanResponse) Descriptor deprecated

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

Deprecated: Use ScanResponse.ProtoReflect.Descriptor instead.

func (*ScanResponse) GetRows

func (x *ScanResponse) GetRows() []*KeyValue

func (*ScanResponse) ProtoMessage

func (*ScanResponse) ProtoMessage()

func (*ScanResponse) ProtoReflect

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

func (*ScanResponse) Reset

func (x *ScanResponse) Reset()

func (*ScanResponse) String

func (x *ScanResponse) String() string

type SetRequest

type SetRequest struct {
	KeyValue *KeyValue `protobuf:"bytes,1,opt,name=key_value,json=keyValue,proto3" json:"key_value,omitempty"`
	// contains filtered or unexported fields
}

func (*SetRequest) Descriptor deprecated

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

Deprecated: Use SetRequest.ProtoReflect.Descriptor instead.

func (*SetRequest) GetKeyValue

func (x *SetRequest) GetKeyValue() *KeyValue

func (*SetRequest) ProtoMessage

func (*SetRequest) ProtoMessage()

func (*SetRequest) ProtoReflect

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

func (*SetRequest) Reset

func (x *SetRequest) Reset()

func (*SetRequest) String

func (x *SetRequest) String() string

type SetResponse

type SetResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*SetResponse) Descriptor deprecated

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

Deprecated: Use SetResponse.ProtoReflect.Descriptor instead.

func (*SetResponse) GetStatus

func (x *SetResponse) GetStatus() string

func (*SetResponse) ProtoMessage

func (*SetResponse) ProtoMessage()

func (*SetResponse) ProtoReflect

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

func (*SetResponse) Reset

func (x *SetResponse) Reset()

func (*SetResponse) String

func (x *SetResponse) String() string

type Txn

type Txn struct {
	TxnId uint64 `protobuf:"varint,1,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"`
	// Use Lookup service before execute
	ReadSet      []*KeyEntry `protobuf:"bytes,20,rep,name=read_set,json=readSet,proto3" json:"read_set,omitempty"`
	WriteSet     []*KeyEntry `protobuf:"bytes,21,rep,name=write_set,json=writeSet,proto3" json:"write_set,omitempty"`
	ReadWriteSet []*KeyEntry `protobuf:"bytes,22,rep,name=read_write_set,json=readWriteSet,proto3" json:"read_write_set,omitempty"`
	// Use Lookup service before execute
	Readers []uint64 `protobuf:"varint,30,rep,packed,name=readers,proto3" json:"readers,omitempty"`
	Writers []uint64 `protobuf:"varint,31,rep,packed,name=writers,proto3" json:"writers,omitempty"`
	TxnType Txn_Type `protobuf:"varint,40,opt,name=txn_type,json=txnType,proto3,enum=qualia.Txn_Type" json:"txn_type,omitempty"`
	// contains filtered or unexported fields
}

func (*Txn) Descriptor deprecated

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

Deprecated: Use Txn.ProtoReflect.Descriptor instead.

func (*Txn) GetReadSet

func (x *Txn) GetReadSet() []*KeyEntry

func (*Txn) GetReadWriteSet

func (x *Txn) GetReadWriteSet() []*KeyEntry

func (*Txn) GetReaders

func (x *Txn) GetReaders() []uint64

func (*Txn) GetTxnId

func (x *Txn) GetTxnId() uint64

func (*Txn) GetTxnType

func (x *Txn) GetTxnType() Txn_Type

func (*Txn) GetWriteSet

func (x *Txn) GetWriteSet() []*KeyEntry

func (*Txn) GetWriters

func (x *Txn) GetWriters() []uint64

func (*Txn) ProtoMessage

func (*Txn) ProtoMessage()

func (*Txn) ProtoReflect

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

func (*Txn) Reset

func (x *Txn) Reset()

func (*Txn) String

func (x *Txn) String() string

type TxnResponse

type TxnResponse struct {
	Rows []*KeyValue `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
	// contains filtered or unexported fields
}

func (*TxnResponse) Descriptor deprecated

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

Deprecated: Use TxnResponse.ProtoReflect.Descriptor instead.

func (*TxnResponse) GetRows

func (x *TxnResponse) GetRows() []*KeyValue

func (*TxnResponse) ProtoMessage

func (*TxnResponse) ProtoMessage()

func (*TxnResponse) ProtoReflect

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

func (*TxnResponse) Reset

func (x *TxnResponse) Reset()

func (*TxnResponse) String

func (x *TxnResponse) String() string

type Txn_Type

type Txn_Type int32
const (
	Txn_FREE    Txn_Type = 0
	Txn_BLOCKED Txn_Type = 1
)

func (Txn_Type) Descriptor

func (Txn_Type) Descriptor() protoreflect.EnumDescriptor

func (Txn_Type) Enum

func (x Txn_Type) Enum() *Txn_Type

func (Txn_Type) EnumDescriptor deprecated

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

Deprecated: Use Txn_Type.Descriptor instead.

func (Txn_Type) Number

func (x Txn_Type) Number() protoreflect.EnumNumber

func (Txn_Type) String

func (x Txn_Type) String() string

func (Txn_Type) Type

type UnimplementedCacheServiceServer

type UnimplementedCacheServiceServer struct {
}

UnimplementedCacheServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCacheServiceServer) Del

func (UnimplementedCacheServiceServer) Get

func (UnimplementedCacheServiceServer) Scan

func (UnimplementedCacheServiceServer) Set

type UnimplementedLookupServiceServer

type UnimplementedLookupServiceServer struct {
}

UnimplementedLookupServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedLookupServiceServer) Lookup

type UnimplementedQualiaServiceServer

type UnimplementedQualiaServiceServer struct {
}

UnimplementedQualiaServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedQualiaServiceServer) ReceiveNewTxn

type UnsafeCacheServiceServer

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

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

type UnsafeLookupServiceServer

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

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

type UnsafeQualiaServiceServer

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

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

Jump to

Keyboard shortcuts

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