v1

package
v0.0.0-...-c30b888 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Lsmdb_OpenDB_FullMethodName = "/lsmdb.v1.Lsmdb/OpenDB"
	Lsmdb_Put_FullMethodName    = "/lsmdb.v1.Lsmdb/Put"
	Lsmdb_PutStr_FullMethodName = "/lsmdb.v1.Lsmdb/PutStr"
	Lsmdb_Get_FullMethodName    = "/lsmdb.v1.Lsmdb/Get"
)
View Source
const OperationLsmdbGet = "/lsmdb.v1.Lsmdb/Get"
View Source
const OperationLsmdbOpenDB = "/lsmdb.v1.Lsmdb/OpenDB"
View Source
const OperationLsmdbPut = "/lsmdb.v1.Lsmdb/Put"
View Source
const OperationLsmdbPutStr = "/lsmdb.v1.Lsmdb/PutStr"

Variables

View Source
var File_api_lsmdb_v1_lsmdb_proto protoreflect.FileDescriptor
View Source
var Lsmdb_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "lsmdb.v1.Lsmdb",
	HandlerType: (*LsmdbServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "OpenDB",
			Handler:    _Lsmdb_OpenDB_Handler,
		},
		{
			MethodName: "Put",
			Handler:    _Lsmdb_Put_Handler,
		},
		{
			MethodName: "PutStr",
			Handler:    _Lsmdb_PutStr_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Lsmdb_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/lsmdb/v1/lsmdb.proto",
}

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

Functions

func RegisterLsmdbHTTPServer

func RegisterLsmdbHTTPServer(s *http.Server, srv LsmdbHTTPServer)

func RegisterLsmdbServer

func RegisterLsmdbServer(s grpc.ServiceRegistrar, srv LsmdbServer)

Types

type GetReply

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

The response message containing the value about register success or not .

func (*GetReply) Descriptor deprecated

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

Deprecated: Use GetReply.ProtoReflect.Descriptor instead.

func (*GetReply) GetValue

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

func (*GetReply) ProtoMessage

func (*GetReply) ProtoMessage()

func (*GetReply) ProtoReflect

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

func (*GetReply) Reset

func (x *GetReply) Reset()

func (*GetReply) String

func (x *GetReply) String() string

type GetRequest

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

The request message containing mac addr and ip.

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetKey

func (x *GetRequest) GetKey() string

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 LsmdbClient

type LsmdbClient interface {
	// Sends a register
	OpenDB(ctx context.Context, in *OpenDBRequest, opts ...grpc.CallOption) (*OpenDBReply, error)
	Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutReply, error)
	PutStr(ctx context.Context, in *PutStrRequest, opts ...grpc.CallOption) (*PutStrReply, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error)
}

LsmdbClient is the client API for Lsmdb 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 NewLsmdbClient

func NewLsmdbClient(cc grpc.ClientConnInterface) LsmdbClient

type LsmdbHTTPClient

type LsmdbHTTPClient interface {
	Get(ctx context.Context, req *GetRequest, opts ...http.CallOption) (rsp *GetReply, err error)
	OpenDB(ctx context.Context, req *OpenDBRequest, opts ...http.CallOption) (rsp *OpenDBReply, err error)
	Put(ctx context.Context, req *PutRequest, opts ...http.CallOption) (rsp *PutReply, err error)
	PutStr(ctx context.Context, req *PutStrRequest, opts ...http.CallOption) (rsp *PutStrReply, err error)
}

func NewLsmdbHTTPClient

func NewLsmdbHTTPClient(client *http.Client) LsmdbHTTPClient

type LsmdbHTTPClientImpl

type LsmdbHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*LsmdbHTTPClientImpl) Get

func (*LsmdbHTTPClientImpl) OpenDB

func (*LsmdbHTTPClientImpl) Put

func (*LsmdbHTTPClientImpl) PutStr

type LsmdbHTTPServer

type LsmdbHTTPServer interface {
	Get(context.Context, *GetRequest) (*GetReply, error)
	// OpenDB Sends a register
	OpenDB(context.Context, *OpenDBRequest) (*OpenDBReply, error)
	Put(context.Context, *PutRequest) (*PutReply, error)
	PutStr(context.Context, *PutStrRequest) (*PutStrReply, error)
}

type LsmdbServer

type LsmdbServer interface {
	// Sends a register
	OpenDB(context.Context, *OpenDBRequest) (*OpenDBReply, error)
	Put(context.Context, *PutRequest) (*PutReply, error)
	PutStr(context.Context, *PutStrRequest) (*PutStrReply, error)
	Get(context.Context, *GetRequest) (*GetReply, error)
	// contains filtered or unexported methods
}

LsmdbServer is the server API for Lsmdb service. All implementations must embed UnimplementedLsmdbServer for forward compatibility

type OpenDBReply

type OpenDBReply struct {
	Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

The response message containing the value about register success or not .

func (*OpenDBReply) Descriptor deprecated

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

Deprecated: Use OpenDBReply.ProtoReflect.Descriptor instead.

func (*OpenDBReply) GetValue

func (x *OpenDBReply) GetValue() bool

func (*OpenDBReply) ProtoMessage

func (*OpenDBReply) ProtoMessage()

func (*OpenDBReply) ProtoReflect

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

func (*OpenDBReply) Reset

func (x *OpenDBReply) Reset()

func (*OpenDBReply) String

func (x *OpenDBReply) String() string

type OpenDBRequest

type OpenDBRequest struct {
	DbName string `protobuf:"bytes,1,opt,name=db_name,json=dbName,proto3" json:"db_name,omitempty"`
	// contains filtered or unexported fields
}

命名必须使用下划线,否则出现传递不了参数的情况

func (*OpenDBRequest) Descriptor deprecated

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

Deprecated: Use OpenDBRequest.ProtoReflect.Descriptor instead.

func (*OpenDBRequest) GetDbName

func (x *OpenDBRequest) GetDbName() string

func (*OpenDBRequest) ProtoMessage

func (*OpenDBRequest) ProtoMessage()

func (*OpenDBRequest) ProtoReflect

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

func (*OpenDBRequest) Reset

func (x *OpenDBRequest) Reset()

func (*OpenDBRequest) String

func (x *OpenDBRequest) String() string

type PutReply

type PutReply struct {
	Data bool `protobuf:"varint,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*PutReply) Descriptor deprecated

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

Deprecated: Use PutReply.ProtoReflect.Descriptor instead.

func (*PutReply) GetData

func (x *PutReply) GetData() bool

func (*PutReply) ProtoMessage

func (*PutReply) ProtoMessage()

func (*PutReply) ProtoReflect

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

func (*PutReply) Reset

func (x *PutReply) Reset()

func (*PutReply) String

func (x *PutReply) String() string

type PutRequest

type PutRequest struct {
	Key   string `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 (*PutRequest) Descriptor deprecated

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

Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.

func (*PutRequest) GetKey

func (x *PutRequest) GetKey() string

func (*PutRequest) GetValue

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

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) ProtoReflect

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

func (*PutRequest) Reset

func (x *PutRequest) Reset()

func (*PutRequest) String

func (x *PutRequest) String() string

type PutStrReply

type PutStrReply struct {
	Data bool `protobuf:"varint,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*PutStrReply) Descriptor deprecated

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

Deprecated: Use PutStrReply.ProtoReflect.Descriptor instead.

func (*PutStrReply) GetData

func (x *PutStrReply) GetData() bool

func (*PutStrReply) ProtoMessage

func (*PutStrReply) ProtoMessage()

func (*PutStrReply) ProtoReflect

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

func (*PutStrReply) Reset

func (x *PutStrReply) Reset()

func (*PutStrReply) String

func (x *PutStrReply) String() string

type PutStrRequest

type PutStrRequest 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 (*PutStrRequest) Descriptor deprecated

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

Deprecated: Use PutStrRequest.ProtoReflect.Descriptor instead.

func (*PutStrRequest) GetKey

func (x *PutStrRequest) GetKey() string

func (*PutStrRequest) GetValue

func (x *PutStrRequest) GetValue() string

func (*PutStrRequest) ProtoMessage

func (*PutStrRequest) ProtoMessage()

func (*PutStrRequest) ProtoReflect

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

func (*PutStrRequest) Reset

func (x *PutStrRequest) Reset()

func (*PutStrRequest) String

func (x *PutStrRequest) String() string

type UnimplementedLsmdbServer

type UnimplementedLsmdbServer struct {
}

UnimplementedLsmdbServer must be embedded to have forward compatible implementations.

func (UnimplementedLsmdbServer) Get

func (UnimplementedLsmdbServer) OpenDB

func (UnimplementedLsmdbServer) Put

func (UnimplementedLsmdbServer) PutStr

type UnsafeLsmdbServer

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

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

Jump to

Keyboard shortcuts

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